Original Post
Ok so I've managed to get this effect working as the common post process implementation by Kenny Mitchell, but...
I'm a little clueless as how to practically use this in a scene.
What I'm currently doing is clearing the "occlusion target" (the target that has the black geometry rendered on top) to a color, which is then being scattered. Now of course this is not what I want as the whole background is completely white and not just e.g. the sun.
How would you fill out the parts where it has to be white or a specific color ?
Also in my deferred renderer what I currently do is render this occlusion information into a single color channel during GBuffer creation.
Is there a better way to do this ? And doing it this way I assume I can't really color this light, having only a single channel ?
I've seen this feature being used practically in the UDK integrated as a checkbox on any light source that you can place.
So let's assume I've got a point light placed somewhere. How would I fill the occlusion target with the white (or the lightcolor) needed to make this effect work on that specific point light ? (Also if it's behind me I need to do some angle checking, right ?)
screenshot of my implementation here:
http://cl.ly/image/3v3k0V0I2w2K
I'm a little clueless as how to practically use this in a scene.
What I'm currently doing is clearing the "occlusion target" (the target that has the black geometry rendered on top) to a color, which is then being scattered. Now of course this is not what I want as the whole background is completely white and not just e.g. the sun.
How would you fill out the parts where it has to be white or a specific color ?
Also in my deferred renderer what I currently do is render this occlusion information into a single color channel during GBuffer creation.
Is there a better way to do this ? And doing it this way I assume I can't really color this light, having only a single channel ?
I've seen this feature being used practically in the UDK integrated as a checkbox on any light source that you can place.
So let's assume I've got a point light placed somewhere. How would I fill the occlusion target with the white (or the lightcolor) needed to make this effect work on that specific point light ? (Also if it's behind me I need to do some angle checking, right ?)
screenshot of my implementation here:
http://cl.ly/image/3v3k0V0I2w2K