<<< Useful concepts | Index | Light component types >>> |
Each component can contribute to the final color of the pixel by using formula:
vec4 final_color = vec4( 0, 0, 0, 1 ); vec3 color = vec3( R, G, B ); final_color = vec4( final_color.rgb + color * intensity, 1.0 );
OpenGL clamps colors that it writes to the output image to the range [0, 1]. Any light intensity that exceeds 1.0, whether alone or combined with other lights, can cause unpleasant visual effects.
<<< Useful concepts | Index | Light component types >>> |