]> git.tdb.fi Git - libs/gl.git/blobdiff - shaderlib/cooktorrance.glsl
Update and improve documentation
[libs/gl.git] / shaderlib / cooktorrance.glsl
index d8e07b292e4e2ecdaa434875ef21f0f7cd1eec72..ff1a56c7c237e240ebd7cb4c69df8a7ce24a36ba 100644 (file)
@@ -74,7 +74,8 @@ virtual vec3 get_emission_color()
 /* Computes the diffuse reflection of the macrosurface */
 vec3 lambert_diffuse(vec3 base_color)
 {
-       // Scale by pi to get a result per steradian, suitable for integration
+       /* Scale by pi (cosine-weighted area of a hemisphere) because the light
+       scatters in every direction */
        return base_color/PI;
 }