diff options
Diffstat (limited to 'decal.cginc')
| -rw-r--r-- | decal.cginc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/decal.cginc b/decal.cginc index bfd4bf5..9203d5f 100644 --- a/decal.cginc +++ b/decal.cginc @@ -66,10 +66,8 @@ float2 decal_rotate(float2 uv, float rotation) { } \ if (_Decal##N##_Metallic_Gloss_Enabled) { \ float4 mg = decal_sample(_Decal##N##_Metallic_Gloss, uv, _Decal##N##_UV_Mode); \ - pbr.metallic = lerp(pbr.metallic, mg.r, albedo.a); \ - pbr.smoothness = lerp(pbr.smoothness, mg.a, albedo.a); \ - pbr.roughness_perceptual = clamp(1 - pbr.smoothness, MIN_PERCEPTUAL_ROUGHNESS, 1); \ - pbr.roughness = clamp(pbr.roughness_perceptual * pbr.roughness_perceptual, MIN_ROUGHNESS, 1); \ + pbr.metallic = lerp(pbr.metallic, mg.r * _Decal##N##_Metallic, albedo.a); \ + pbr.smoothness = lerp(pbr.smoothness, mg.a * _Decal##N##_Gloss, albedo.a); \ } \ if (_Decal##N##_Normal_Enabled) { \ float3 dn = UnpackNormal(decal_sample(_Decal##N##_Normal, uv, _Decal##N##_UV_Mode)); \ |
