Skip to content

Commit

Permalink
Fix compile warning on some D3D12 HLSL compiler versions
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Nov 17, 2023
1 parent 07b1c3f commit 70b2fac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion renderdoc/data/hlsl/quadoverdraw.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ Texture2DArray<uint> overdrawSRV : register(t0);
// (* For more details, see:
// "Shader Amortization using Pixel Quad Message Passing", Eric Penner, GPU Pro 2.)
uint2 p = uint2(vpos.xy) & 1;
int2 sign = p ? -1 : 1;
int2 sign;
sign.x = p.x ? -1 : 1;
sign.y = p.y ? -1 : 1;

uint c1 = c0 + sign.x * ddx_fine(c0);
uint c2 = c0 + sign.y * ddy_fine(c0);
uint c3 = c2 + sign.x * ddx_fine(c2);
Expand Down

0 comments on commit 70b2fac

Please sign in to comment.