clamping values to avoid pink specularity

This commit is contained in:
samuncle 2014-12-10 03:02:36 +01:00
parent a8ce996047
commit cb8017cae1

View File

@ -7,5 +7,5 @@ vec3 SpecularIBL(vec3 normal, vec3 V, float roughness)
// Assume 8 level of lod (ie 256x256 texture)
float lodval = 8. * (1. - roughness);
return max(textureLod(probe, sampleDirection, lodval).rgb, vec3(0.));
}
return clamp( textureLod(probe, sampleDirection, lodval).rgb, 0., 1.);
}