summaryrefslogtreecommitdiff
path: root/intermediate/surface.glsl
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2025-01-09 22:53:40 +1100
committerquou <quou@disroot.org>2025-01-09 22:53:40 +1100
commit622e634e1cfd55dd875979a1f109a804d3dbe7ee (patch)
treed71ec2ff776221189a006b5ffc3a0ac78f3c664a /intermediate/surface.glsl
parentb3363b1716fbbb2af1b33b9bdd7a13f72016283d (diff)
mipmap the environment probe
Diffstat (limited to 'intermediate/surface.glsl')
-rw-r--r--intermediate/surface.glsl4
1 files changed, 2 insertions, 2 deletions
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) *