Skip to content

Commit

Permalink
Merge branch 'spriteSheetWrapping' into 'main'
Browse files Browse the repository at this point in the history
Use only the fractional part of UV coords in calcSpriteSheetAdjustment

See merge request lightspeedrtx/dxvk-remix-nv!974
  • Loading branch information
MarkEHenderson committed Sep 6, 2024
2 parents 9ef8b6e + 1822d32 commit 34e103e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void calcSpriteSheetAdjustment(
const vec2 uvSize = vec2(1.0f / spriteSheetCols, 1.0f / spriteSheetRows);
const vec2 uvBias = vec2(frame % spriteSheetCols, frame / spriteSheetCols) * uvSize;

textureCoordinates = uvBias + textureCoordinates * uvSize;
textureCoordinates = uvBias + frac(textureCoordinates) * uvSize;
textureGradientX *= uvSize;
textureGradientY *= uvSize;
}
Expand Down

0 comments on commit 34e103e

Please sign in to comment.