From 622e634e1cfd55dd875979a1f109a804d3dbe7ee Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 9 Jan 2025 22:53:40 +1100 Subject: mipmap the environment probe --- intermediate/surface.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intermediate/surface.glsl') diff --git a/intermediate/surface.glsl b/intermediate/surface.glsl index 8ec24f0..fab8694 100644 --- a/intermediate/surface.glsl +++ b/intermediate/surface.glsl @@ -165,8 +165,8 @@ void main() { float met = texture(metal, uv).r * material.metalness; vec3 ref = reflect(-view_dir, nrm); - vec3 spec_col = texture(env_cube, ref).rgb; - vec3 amb_col = texture(env_cube, nrm).rgb; + vec3 spec_col = texture(env_cube, ref, material.roughness * 8.0).rgb; + vec3 amb_col = textureLod(env_cube, nrm, 8.0).rgb; vec3 diffuse = diffuse_brdf(uv) * -- cgit v1.2.3-54-g00ecf