From b0d6d511db6113443993fecf5fdf93dce6e40700 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 1b0bd269b0a..501d6c8f3a4 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 d93a26ddf78a8ec8be766df2a5f6704deed257e2 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Tue, 12 May 2020 14:56:38 +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 e6d59ed0021..49b70761da8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -581,6 +581,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed flickering of the game/scene view when lookdev is running. - Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). - Fixed transparent motion vectors not working when in MSAA. +- Fixed corrupted values on LayeredLit when using Vertex Color multiply mode to multiply and MSAA is activated. ### Changed - Improve MIP selection for decals on Transparents