Fix reflection mip level constant on PBR textured scene.

This commit is contained in:
Joey de Vries
2017-09-26 19:11:01 +02:00
parent 673fe1e89f
commit 3a04c6f9f4

View File

@@ -157,7 +157,7 @@ void main()
vec3 diffuse = irradiance * albedo; 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. // 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; vec3 prefilteredColor = textureLod(prefilterMap, R, roughness * MAX_REFLECTION_LOD).rgb;
vec2 brdf = texture(brdfLUT, vec2(max(dot(N, V), 0.0), roughness)).rg; vec2 brdf = texture(brdfLUT, vec2(max(dot(N, V), 0.0), roughness)).rg;
vec3 specular = prefilteredColor * (F * brdf.x + brdf.y); vec3 specular = prefilteredColor * (F * brdf.x + brdf.y);