diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 08b3926650f..8ffeef0c4b7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -665,6 +665,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed area light cookie not updated when switch the light type from a spot that had a cookie. - Fixed issue with dynamic resolution updating when not in play mode. - Fixed issue with Contrast Adaptive Sharpening upsample mode and preview camera. +- Fix issue causing blocky artifacts when decals affect metallic and are applied on material with specular color workflow. ### Changed - Improve MIP selection for decals on Transparents diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl index 06951a7e204..eff35477336 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDecalData.hlsl @@ -16,7 +16,7 @@ void ApplyDecalToSurfaceData(DecalSurfaceData decalSurfaceData, inout SurfaceDat #ifdef DECALS_4RT // only smoothness in 3RT mode #ifdef _MATERIAL_FEATURE_SPECULAR_COLOR float3 decalSpecularColor = ComputeFresnel0((decalSurfaceData.HTileMask & DBUFFERHTILEBIT_DIFFUSE) ? decalSurfaceData.baseColor.xyz : float3(1.0, 1.0, 1.0), decalSurfaceData.mask.x, DEFAULT_SPECULAR_VALUE); - surfaceData.specularColor = surfaceData.specularColor * decalSurfaceData.MAOSBlend.x + decalSpecularColor; + surfaceData.specularColor = surfaceData.specularColor * decalSurfaceData.MAOSBlend.x + decalSpecularColor * (1.0f - decalSurfaceData.MAOSBlend.x); #else surfaceData.metallic = surfaceData.metallic * decalSurfaceData.MAOSBlend.x + decalSurfaceData.mask.x; #endif