From 3a04c6f9f41dc99a9db8dc42e8e9f5fb77d95f19 Mon Sep 17 00:00:00 2001 From: Joey de Vries Date: Tue, 26 Sep 2017 19:11:01 +0200 Subject: [PATCH] Fix reflection mip level constant on PBR textured scene. --- src/6.pbr/2.2.2.ibl_specular_textured/2.2.2.pbr.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/6.pbr/2.2.2.ibl_specular_textured/2.2.2.pbr.fs b/src/6.pbr/2.2.2.ibl_specular_textured/2.2.2.pbr.fs index 0d98d8d..b460568 100644 --- a/src/6.pbr/2.2.2.ibl_specular_textured/2.2.2.pbr.fs +++ b/src/6.pbr/2.2.2.ibl_specular_textured/2.2.2.pbr.fs @@ -157,7 +157,7 @@ void main() vec3 diffuse = irradiance * albedo; // sample both the pre-filter map and the BRDF lut and combine them together as per the Split-Sum approximation to get the IBL specular part. - const float MAX_REFLECTION_LOD = 4.0; + const float MAX_REFLECTION_LOD = 5.0; vec3 prefilteredColor = textureLod(prefilterMap, R, roughness * MAX_REFLECTION_LOD).rgb; vec2 brdf = texture(brdfLUT, vec2(max(dot(N, V), 0.0), roughness)).rg; vec3 specular = prefilteredColor * (F * brdf.x + brdf.y);