Project Rembrandt: Difference between revisions

Line 19: Line 19:


;Then comes the Lighting Stage, with several substages :
;Then comes the Lighting Stage, with several substages :
:*Sky and cloud pass: the sky and the clouds are first drawn using classical method.
:*'''Sky and cloud pass''': the sky and the clouds are first drawn using classical method.
:*Ambient pass: the diffuse buffer is modulated with the ambient color of the scene and is drawn as a screen-aligned textured quad
:*'''Ambient pass''': the diffuse buffer is modulated with the ambient color of the scene and is drawn as a screen-aligned textured quad
:*Sunlight pass: a second screen aligned quad is drawn and a shader computes the view position of every pixel to compute its diffuse and specular color, using the normal stored in the first stage. The resulting color is blended with the previous pass.
:*'''Sunlight pass''': a second screen aligned quad is drawn and a shader computes the view position of every pixel to compute its diffuse and specular color, using the normal stored in the first stage. The resulting color is blended with the previous pass. Shadows are computed here by comparing the position of the pixel with the position of the light occluder stored in the shadow map.
:*Fog pass: a new screen aligned quad is draw and the position of the pixel is computed to evaluate the amount of fog the pixel has. The forg color is blended with the result of the previous stage.
:*'''Additional light pass''' (''to be implemented''): the scene graph will be traversed another time to display light volumes (cone or frusta for spot lights, sphere for omni-directional lights) and their shader will add the light contributed by the source only on pixels receiving light.
:*'''Fog pass''': a new screen aligned quad is draw and the position of the pixel is computed to evaluate the amount of fog the pixel has. The fog color is blended with the result of the previous stage.


;In the end, the Display Stage, with optional Post-Processing effect :
;In the end, the Display Stage, with optional Post-Processing effect :
269

edits