Skip to content

Commit 8956f57

Browse files
authored
Merge pull request #3612 from Kasasagi77/diagonal_artifacts_tweak
fix: Tweaks for the diagonal rasterization artifacts fix
2 parents 17fc8d3 + 9c335be commit 8956f57

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/render.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ func drawQuads(modelview mgl.Mat4, x1, y1, x2, y2, x3, y3, x4, y4 float32) {
231231
// This effectively side-steps a low-level rectangle rasterization edge case,
232232
// that caused visible and frequent artifacts on the diagonal.
233233
// See: https://github.com/ikemen-engine/Ikemen-GO/issues/3583
234-
uvZero := float32(0.000002)
234+
uvBias := float32(0.000002)
235235

236236
gfx.SetVertexData(
237-
x2, y2, 1, 1,
238-
x3, y3, 1, uvZero,
239-
x1, y1, uvZero, 1,
240-
x4, y4, uvZero, uvZero,
237+
x2, y2, 1, 1-uvBias,
238+
x3, y3, 1, 0,
239+
x1, y1, uvBias, 1-uvBias,
240+
x4, y4, uvBias, 0,
241241
)
242242

243243
gfx.RenderQuad()

0 commit comments

Comments
 (0)