CLean up the shader code for the blinn and the new PBR shading equation

This commit is contained in:
Sam Gateau 2015-02-09 15:30:17 -08:00
parent ed8d433ad5
commit 871f9a849a

View file

@ -28,8 +28,7 @@ vec4 evalPBRShading(vec3 fragNormal, vec3 fragLightDir, vec3 fragEyeDir, vec3 sp
float shlickPower = (1.0 - dot(fragLightDir,halfDir));
float shlickPower2 = shlickPower * shlickPower;
float shlickPower5 = shlickPower2 * shlickPower2 * shlickPower;
// vec3 schlick = specular * (1.0 - shlickPower5) + vec3(shlickPower5);
vec3 schlick = vec3(0.21) * (1.0 - shlickPower5) + vec3(shlickPower5);
vec3 schlick = specular * (1.0 - shlickPower5) + vec3(shlickPower5);
vec3 reflect = specularPower * schlick;
return vec4(reflect, diffuse);