Crepuscular Rays in Screen Space

I have added a new post-processing effect that approximates light scattering on the sunlight according to this GPU Gems 3 article. It required a minor coding on the engine, I have introduced two new built-in shader parameters: sun screen-space position to use in the calculation, and a term that gradually scales down the ray effect when the camera is not turned towards the sun. The process itself has been implemented in the postprocessing shader of the deferred chain, that made implementing it easy because all required data is available at this point of the rendering.

Here are some pictures about the result.

Advertisements

Posted on April 20, 2012, in 3D programming, Deferred Shading, GLSL and tagged , , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: