Project Rembrandt: Difference between revisions

Jump to navigation Jump to search
Line 50: Line 50:
#Specular color, modified with gl_FragData[2].rgb, and specular shininess in gl_FragData[2].a, will retain the specular color of the fragment.
#Specular color, modified with gl_FragData[2].rgb, and specular shininess in gl_FragData[2].a, will retain the specular color of the fragment.
In anyway, don't use gl_FragColor as it is incompatible with MRT (Multi Render Target) and would affect the three last buffers with the same value.
In anyway, don't use gl_FragColor as it is incompatible with MRT (Multi Render Target) and would affect the three last buffers with the same value.
=== Additional light pass ===
There would be a single shader for each light type used. The plan is to create lights like animations in the model XML file. The light shader will retrieve scene geometry by combining screen space position converted in view space ray by the inverse of the projection matrix (an helper function should be provided), and the fragment depth at that screen position read from the depth buffer. With the help of the fragment normal, the diffuse and specular color and the properties of the light the shader implements, it will be possible to add to the lighting buffer the contribution of the light rendered.


=== Fog Pass ===
=== Fog Pass ===
Using the fragment depth, it will be possible to compute any fog distribution. For the moment, the simple fog equation is implemented.


== References ==
== References ==
*[http://bat710.univ-lyon1.fr/~jciehl/Public/educ/GAMA/2007/Deferred_Shading_Tutorial_SBGAMES2005.pdf Deferred Shading Tutorial]
*[http://bat710.univ-lyon1.fr/~jciehl/Public/educ/GAMA/2007/Deferred_Shading_Tutorial_SBGAMES2005.pdf Deferred Shading Tutorial]
*[http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf Deferred Rendering in Killzone 2]
*[http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf Deferred Rendering in Killzone 2]
269

edits

Navigation menu