mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphics: Adjust texel positions for consitency
On second thought, given pixel coords represent a center of texels...
This commit is contained in:
parent
7c66d884d4
commit
816fb314a4
@ -144,6 +144,7 @@ void main(void) {
|
||||
#if defined(FILTER_SCREEN)
|
||||
pos = roundTexel(pos);
|
||||
highp vec2 texel_size = 1.0 / source_size;
|
||||
pos -= texel_size * 0.5 * scale;
|
||||
|
||||
highp vec2 p0 = pos;
|
||||
highp vec2 p1 = pos + texel_size / scale;
|
||||
|
Loading…
Reference in New Issue
Block a user