Clamp SpecularIBL value on positive range
This commit is contained in:
parent
25e059dd3e
commit
d97b9f2d0e
@ -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 textureLod(probe, sampleDirection, lodval).rgb;
|
||||
return max(textureLod(probe, sampleDirection, lodval).rgb, vec3(0.));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user