Skip to content

Fix issue with MSAA resolve killing alpha channel #2046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down