Screen-Space Global Illumination Filter v1.5

Video texture module can store images I think*
So can PIL

You need to use a image buffer I think*

Hi SebastianMestre,very interesting approach for indirect lighting. I see a huge potential. It looks fine for static scenes, but because the samples are static (relative to viewer) there is a lot of aliasing or flickering happening. Also the samples are gathered evenly on the view surface so when projected on a horizontal surface in perspective, the intensity decreases. This causes an uneven distribution of reflected light intensities - closer surfaces are bighter than in distance.
I think it could be solved with a system that would distribute the samples based on camera movement and reduce the intensity based on linear depth buffer.

Oh thank you!

I already have a solution for perspective related issues, i’ll put it up tomorrow.

As for the flickering i have an idea but it will take me some time to implement.


Are you still working on this? It has a lot of potential!

Here is a little experiment: indirect lighting fully raytraced in screen space

it is hella slow and full of choppiness but it can light up entire scenes and produces both indirect lighting (i.e from an emisive plane / wall with a light being shun down upon it) and soft shadows from said indirect lighting.

this is just a silly and useless experiment but a similar technique could be used to add shadows to the existing VPL based filter to make it look better. It would still not look as good as raytracing but it would be much, much faster.

Also. This filter, unlike the VPL one, is temporally coherent (a.k.a. no flickering apart from some noise shifting around the screen).

Let me know what you think.

My main project right now is screen space reflections. However, i do still work on this from time to time.
And although school does take priority over anything else i do, especially now when we’re going through finals week, i do find a few hours each weekend to work on various projects. and vacations are coming soon so i will have plenty of spare time.

That said, i found some time and updated this filter the other day. now it is less physically correct in a sense but it can look much better. Also, i added more proper perspective correction.

the filter is not working properly

in worldmap settings (earthglobe, rightside ->) did you set…:

since this uses samples that tend to flicker, can it be improved using the sample data from last frame?

here is an example of a offscreen buffer

we should have render attachements in UPBGE soon also*

your screen space reflection shader should get a significant speed boost.
Do you want to work closer with the upbge devs?

Ohh that is certainly something i have to look into. Thanks for the link!

I don’t know about working with the UPBGE devs, I’m honestly not very reliable so I think I would just slow down anyone that intended to rely on me :stuck_out_tongue:

yes i did

Not sure if it is related to your issue but it seems i messed up gamma correction big time.
I just noticed this today so bear with me while i upload a fix

EDIT: all done and dusted. Update is up. It should maybe run faster and look a bunch nicer.

I got one problem

you can see the polygons

whenever my character moves the GL is just glitching

Yes. I am aware of that. That is just an intrinsic property of how this filter works. It reconstructs normals from a depth buffer, so surfaces look “flat shaded”. In the future i guess I’ll be targetting UPBGE so i have to look into if UPBGE provides some means of getting a normals buffer which i can sample directly (this would also improve performance tremendously. It could run up to (and roughly) 3x faster)

As for your second issue, i know about that. It is just caused by the amount of samples available to the filter. Its effects can be alleviated by increasing the sample count or through some temporal filtering, I just haven’t gotten around to implementing it. Again. If i could get access to mipmapped colour and normals buffers this could be further alleviated

this is do to be applied to master this release

1 Like

how is it ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍

I have been very busy.

I have been working on my personal projects, contributing to an open source project, and i just got a part time job as a programmer for the next few months so it’ll be some time until I can get stuff done.

1 Like

k all good

Hey dude, got any new update for your shader?