OpenGL volumetric light implementation

Started by
1 comment, last by ccel 5 years, 4 months ago

Hi,
I'm trying to produce volumetric light in OpenGL following the implementation details on "GPU Pro 5 Volumetric light effects in KillZone". I am confused on the number of passes needed  to create the effect.

So I got the shadow pass which renders the scene from the light's POV, then I have the GBuffer pass which renders to texture the whole scene. and finally a 3rd pass which computes the ray marching on every pixel and computes the amount of accumulated scattering factor according to its distance of the light in the scene (binding the shadow map form the first pass). Then what ? blending these 3 buffers on a full screen quad finally pass ??  or maybe should I do the ray marching in the resulting buffer of blending the shadow map and the Gbuffer?

 

Thanks in advance

Advertisement

You can treat volumetric lighting similar distance fog where you attenuate the light path from surfaces to camera. So this can be applied in your gbuffer pass after you light the pixel.

See slide 45 from Bart Wronski's 2014 SIGGRAPH talk:
https://bartwronski.files.wordpress.com/2014/08/bwronski_volumetric_fog_siggraph2014.pdf

This topic is closed to new replies.

Advertisement