graphics: Adjust texel positions for consitency

On second thought, given pixel coords represent a center of texels...
This commit is contained in:
Hajime Hoshi 2018-02-24 01:52:05 +09:00
parent 7c66d884d4
commit 816fb314a4

View File

@ -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;