-
Notifications
You must be signed in to change notification settings - Fork 92
Platform toolset143 compatibility #57
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
base: main
Are you sure you want to change the base?
Changes from all commits
21e5717
4c7aff4
7f0575b
0ca5687
8429e0c
fb9789a
81e0545
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,21 +37,24 @@ void main( uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Grou | |
| float TileMaxDepth = Max4(Depths); | ||
| float TileMaxCoC = MaxCoC(Depths); | ||
|
|
||
| // Write and sync | ||
| gs_ClosestDepthSearch[GI] = TileMinDepth; | ||
| gs_FarthestDepthSearch[GI] = TileMaxDepth; | ||
| gs_MaximumCoC[GI] = TileMaxCoC; | ||
| GroupMemoryBarrierWithGroupSync(); | ||
|
|
||
| for (uint i = 32; i > 0; i >>= 1) | ||
| { | ||
| // Write and sync | ||
| gs_ClosestDepthSearch[GI] = TileMinDepth; | ||
| gs_FarthestDepthSearch[GI] = TileMaxDepth; | ||
| gs_MaximumCoC[GI] = TileMaxCoC; | ||
| GroupMemoryBarrierWithGroupSync(); | ||
|
|
||
| // Read and sync | ||
| TileMinDepth = min(TileMinDepth, gs_ClosestDepthSearch[(GI + i) % 64]); | ||
| TileMaxDepth = max(TileMaxDepth, gs_FarthestDepthSearch[(GI + i) % 64]); | ||
| TileMaxCoC = max(TileMaxCoC, gs_MaximumCoC[(GI + i) % 64]); | ||
| if (GI < i) | ||
| { | ||
| gs_ClosestDepthSearch[i] = min(gs_ClosestDepthSearch[i], gs_ClosestDepthSearch[GI + i]); | ||
| gs_FarthestDepthSearch[i] = max(gs_FarthestDepthSearch[i], gs_FarthestDepthSearch[GI + i]); | ||
| gs_MaximumCoC[i] = max(gs_MaximumCoC[i], gs_MaximumCoC[GI + i]); | ||
| } | ||
| GroupMemoryBarrierWithGroupSync(); | ||
| } | ||
|
|
||
| if (GI == 0) | ||
| TileClass[Gid.xy] = float3(TileMaxCoC, TileMinDepth, TileMaxDepth); | ||
| TileClass[Gid.xy] = float3(gs_MaximumCoC[0], gs_FarthestDepthSearch[0], gs_FarthestDepthSearch[0]); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be gs_ClosestDepthSearch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (specifically, the first gs_FarthestDepthSearch on this line) |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,14 +42,14 @@ float3 ScaleBuffer(float2 uv) | |
| } | ||
|
|
||
| [RootSignature(Present_RootSig)] | ||
| float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0 | ||
| float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0 | ||
| { | ||
| float3 MainColor = ApplyREC2084Curve(ScaleBuffer(uv) / 10000.0); | ||
| float3 MainColor = ApplyREC2084Curve( saturate(ScaleBuffer(uv) / 10000.0) ); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not very familiar with this method - what caused the need to add saturate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also small nit: spacing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Zu-shi The PR description states that it updates the shaders to match the DirectX-Graphics-Samples repository, which appears to be their primary location and is thus more up-to-date. The |
||
|
|
||
| float4 OverlayColor = OverlayBuffer[(int2)position.xy]; | ||
| OverlayColor.rgb = RemoveSRGBCurve(OverlayColor.rgb); | ||
| OverlayColor.rgb = REC709toREC2020(OverlayColor.rgb / (OverlayColor.a == 0.0 ? 1.0 : OverlayColor.a)); | ||
| OverlayColor.rgb = ApplyREC2084Curve(OverlayColor.rgb * PaperWhiteRatio); | ||
|
|
||
| return float4(lerp(MainColor, OverlayColor.rgb, OverlayColor.a), 1); | ||
| return lerp(MainColor, OverlayColor.rgb, OverlayColor.a); | ||
| } | ||
coopp marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... it would be helpful to have a description in the PR for the reasoning of change in this method. Should this be setting [GI] instead of [i]?