I am suppose to implement a shader in GLSL using deferred shading.
As I understand I can write to the textures like this.
gl_FragData = gl_Color; gl_FragData = vec4(vNormal, pixelDepth); gl_FragData = vec4(worldPosition, 1.0); gl_FragData = vec4(diff_coeff, phong_coeff, two_sided, 1.0);
What I don’t understand is how to use the textures in the final rendering. Should this be done in fragment shader?
How is this suppose to work?