From 2d9b5c56ee7ce9e2a696ecff665c5679f06e28a1 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Tue, 12 May 2020 13:32:41 +0200 Subject: [PATCH 1/2] Saturate vertex color to avoid negative values. --- .../Runtime/Material/LayeredLit/LayeredLitData.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index ab216729cbc..821ee5814e8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -494,7 +494,7 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod // It also means that when using wind, users can't use vertex color to modulate the effect of influence from the main layer. float4 maskVertexColor = vertexColor; #if defined(_LAYER_MASK_VERTEX_COLOR_MUL) - blendMasks *= maskVertexColor; + blendMasks *= saturate(maskVertexColor); #elif defined(_LAYER_MASK_VERTEX_COLOR_ADD) blendMasks = saturate(blendMasks + maskVertexColor * 2.0 - 1.0); #endif From 5bed097a82b1581cb01ff0d3e4a58c0ccba19e2a Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Tue, 12 May 2020 17:44:19 +0200 Subject: [PATCH 2/2] changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d31f1a2bc1f..f72292ec10e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -665,6 +665,7 @@ The version number for this package has increased due to a version update of a r - Fix Wizard load when none selected for RenderPipelineAsset - Fixed issue with unclear naming of debug menu for decals. - Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). +- Fixed corrupted values on LayeredLit when using Vertex Color multiply mode to multiply and MSAA is activated. ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled