diff options
| author | yum <yum.food.vr@gmail.com> | 2025-06-30 10:14:43 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-06-30 10:14:43 -0700 |
| commit | c2f86fa940195d07e2c82614985b249418f0d4f6 (patch) | |
| tree | 3a060bc60e78f49be8cc6b6b6bcc1830e5219c03 /yum_pbr.cginc | |
| parent | 4f786eba18f5535b1cba10ef0e4dc2a269dde705 (diff) | |
more brdf tweaks - mainly fix how reflectance is handled
Diffstat (limited to 'yum_pbr.cginc')
| -rw-r--r-- | yum_pbr.cginc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yum_pbr.cginc b/yum_pbr.cginc index 08bdd67..8df2fde 100644 --- a/yum_pbr.cginc +++ b/yum_pbr.cginc @@ -129,7 +129,8 @@ YumPbr GetYumPbr(v2f i, float3x3 tangentToWorld) { #endif applyDecals(i, result.albedo, normal_tangent, result.metallic, result.smoothness, result.emission); - result.smoothness = min(0.99, result.smoothness); + const float min_roughness_perceptual = 0.045f; + result.smoothness = min(1.0f - min_roughness_perceptual, result.smoothness); propagateRoughness(result.smoothness, result.roughness_perceptual, result.roughness); #if defined(_OKLCH_CORRECTION) |
