mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +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)
|
#if defined(FILTER_SCREEN)
|
||||||
pos = roundTexel(pos);
|
pos = roundTexel(pos);
|
||||||
highp vec2 texel_size = 1.0 / source_size;
|
highp vec2 texel_size = 1.0 / source_size;
|
||||||
|
pos -= texel_size * 0.5 * scale;
|
||||||
|
|
||||||
highp vec2 p0 = pos;
|
highp vec2 p0 = pos;
|
||||||
highp vec2 p1 = pos + texel_size / scale;
|
highp vec2 p1 = pos + texel_size / scale;
|
||||||
|
Loading…
Reference in New Issue
Block a user