diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 0453efa69d3..38c82bb87ba 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -110,6 +110,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the dependecy of FrameSettings (MSAA, ClearGBuffer, DepthPrepassWithDeferred) (case 1277620). - Fixed the usage of GUIEnable for volume components (case 1280018). - Fixed the diffusion profile becoming invalid when hitting the reset (case 1269462). +- Fixed issue with MSAA resolve killing the alpha channel. ### Changed - Preparation pass for RTSSShadows to be supported by render graph. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader index 60a8cb67b03..3572c956516 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader @@ -60,12 +60,13 @@ Shader "Hidden/HDRP/ColorResolve" for (int i = 0; i < sampleCount; ++i) { float4 currSample = (LoadColorTextureMS(pixelCoords, i)); - finalVal += currSample * ResolveWeight(currSample, sampleCount); + finalVal.rgb += currSample.rgb * ResolveWeight(currSample, sampleCount); + finalVal.a += currSample.a * rcp(sampleCount); } finalVal.xyz *= InverseToneMapWeight(finalVal); - return float4(finalVal.rgb, 1.0f); + return finalVal; } float4 Frag1X(Varyings input) : SV_Target