Skip to content

Commit

Permalink
REBLUR/RELAX: fixed critical regression breaking pre-pass logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhdanNV committed Feb 3, 2025
1 parent c559760 commit 567fae2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Shaders/Include/Common.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ float4 IsInScreenBilinear( float2 footprintOrigin, float2 rectSize )
float2 ApplyCheckerboardShift( float2 pos, uint mode, uint counter, uint frameIndex )
{
// IMPORTANT: "pos" must be snapped to the pixel center
pos += 16384.0; // apply pattern-neutral bias, to make "pos" non-negative
uint checkerboard = Sequence::CheckerBoard( uint2( pos ), frameIndex );
float2 posPositive = pos + 16384.0; // apply pattern-neutral bias, to make "pos" non-negative
uint checkerboard = Sequence::CheckerBoard( uint2( posPositive ), frameIndex );
float shift = ( ( counter & 0x1 ) == 0 ) ? -1.0 : 1.0;

pos.x += shift * float( checkerboard != mode && mode != 2 );
Expand Down

0 comments on commit 567fae2

Please sign in to comment.