summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-27 15:06:27 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-27 15:06:27 -0700
commit91a9a94df115fa2a69abb6cb1a6eacb569f08eef (patch)
tree5afcc8e94c37d0aa5dc680ce32b0510ba429ef69 /indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
parent6c554c9c92a0150fdf5a177bf33269eac8341d02 (diff)
parentc20058b7a7207cb80426796d9d77864c696a5eec (diff)
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl b/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
index b6f080739e..a1839d4a67 100644
--- a/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
@@ -151,7 +151,7 @@ vec4 prefilterEnvMap(vec3 R)
// Solid angle of 1 pixel across all cube faces
float omegaP = 4.0 * PI / (6.0 * envMapDim * envMapDim);
// Biased (+1.0) mip level for better result
- float mipLevel = roughness == 0.0 ? 0.0 : max(0.5 * log2(omegaS / omegaP) + 1.0, 0.0f);
+ float mipLevel = roughness == 0.0 ? 0.0 : clamp(0.5 * log2(omegaS / omegaP) + 1.0, 0.0f, max_probe_lod);
color += textureLod(reflectionProbes, vec4(L, sourceIdx), mipLevel) * dotNL;
totalWeight += dotNL;
}