Project Rembrandt: Difference between revisions

Line 134: Line 134:
#Diffuse color buffer, modified with gl_FragData[1].rgb, will hold the unshaded color of the fragment, usually modulating the material diffuse+ambient color with the texture map. Diffuse color from environment mapping should also go here.
#Diffuse color buffer, modified with gl_FragData[1].rgb, will hold the unshaded color of the fragment, usually modulating the material diffuse+ambient color with the texture map. Diffuse color from environment mapping should also go here.
#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.
#Emission color, modified with gl_FragData[3].rgb
In anyway, don't use gl_FragColor as it is incompatible with MRT (Multi Render Target) and would affect the four last buffers with the same value. In that case, the model will glow (emission buffer initialized) and parts will disappear at certain view angles because normals are not initialized properly.


=== Additional light pass ===
=== Additional light pass ===
269

edits