When there are 8 lod level, 7 is the max
This commit is contained in:
parent
86b2d2f327
commit
70e8b4c854
@ -6,6 +6,6 @@ vec3 SpecularIBL(vec3 normal, vec3 V, float roughness)
|
|||||||
sampleDirection = (InverseViewMatrix * vec4(sampleDirection, 0.)).xyz;
|
sampleDirection = (InverseViewMatrix * vec4(sampleDirection, 0.)).xyz;
|
||||||
|
|
||||||
// Assume 8 level of lod (ie 256x256 texture)
|
// Assume 8 level of lod (ie 256x256 texture)
|
||||||
float lodval = 8. * (1. - roughness);
|
float lodval = 7. * (1. - roughness);
|
||||||
return clamp( textureLod(probe, sampleDirection, lodval).rgb, 0., 1.);
|
return clamp(textureLod(probe, sampleDirection, lodval).rgb, 0., 1.);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user