X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=shaderlib%2Fcooktorrance.glsl;h=ff1a56c7c237e240ebd7cb4c69df8a7ce24a36ba;hb=190a7e11237351f6b730c28f7b16f183e8adc69c;hp=d8e07b292e4e2ecdaa434875ef21f0f7cd1eec72;hpb=be6ffe96ecb4707599fe1a6f620c348760213d46;p=libs%2Fgl.git diff --git a/shaderlib/cooktorrance.glsl b/shaderlib/cooktorrance.glsl index d8e07b29..ff1a56c7 100644 --- a/shaderlib/cooktorrance.glsl +++ b/shaderlib/cooktorrance.glsl @@ -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; }