Determine pixel-to-texel ratio for each sprite individually.

This fixes rendering artifacts when sprites are scaled > 1.
This commit is contained in:
Paul Chote
2024-10-29 21:50:47 +00:00
committed by Gustas
parent 42989c74aa
commit 09063d23da
4 changed files with 16 additions and 13 deletions

View File

@@ -253,9 +253,9 @@ namespace OpenRA.Graphics
shader.SetVec("DepthPreviewParams", contrast, offset);
}
public void SetAntialiasingPixelsPerTexel(float pxPerTx)
public void EnablePixelArtScaling(bool enabled)
{
shader.SetVec("AntialiasPixelsPerTexel", pxPerTx);
shader.SetBool("EnablePixelArtScaling", enabled);
}
}
}