Some 1x1 pixel regions on a 1024x1024 atlas weren't rendering.
regionWidth = Math.round(Math.abs(u2 - u) * texWidth);\r
regionHeight = Math.round(Math.abs(v2 - v) * texHeight);\r
\r
- // For a 1x1 region, adjust UVs to pixel center to avoid filtering artifacts on AMD GPUs when drawing stretched.\r
+ // For a 1x1 region, adjust UVs toward pixel center to avoid filtering artifacts on AMD GPUs when drawing very stretched.\r
if (regionWidth == 1 && regionHeight == 1) {\r
- u += 0.5f / texWidth;\r
- u2 = u;\r
- v += 0.5f / texHeight;\r
- v2 = v;\r
+ float adjustX = 0.25f / texWidth;\r
+ u += adjustX;\r
+ u2 -= adjustX;\r
+ float adjustY = 0.25f / texHeight;\r
+ v += adjustY;\r
+ v2 -= adjustY;\r
}\r
\r
this.u = u;\r