From 70e8b4c854a070ba5552baf1bc14300692b076b3 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Thu, 15 Jan 2015 19:52:48 +0100 Subject: [PATCH] When there are 8 lod level, 7 is the max --- data/shaders/utils/SpecularIBL.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/shaders/utils/SpecularIBL.frag b/data/shaders/utils/SpecularIBL.frag index 053348a7f..6bbb8b78c 100644 --- a/data/shaders/utils/SpecularIBL.frag +++ b/data/shaders/utils/SpecularIBL.frag @@ -6,6 +6,6 @@ vec3 SpecularIBL(vec3 normal, vec3 V, float roughness) sampleDirection = (InverseViewMatrix * vec4(sampleDirection, 0.)).xyz; // Assume 8 level of lod (ie 256x256 texture) - float lodval = 8. * (1. - roughness); - return clamp( textureLod(probe, sampleDirection, lodval).rgb, 0., 1.); + float lodval = 7. * (1. - roughness); + return clamp(textureLod(probe, sampleDirection, lodval).rgb, 0., 1.); }