Skip to content

Commit 42456ee

Browse files
committed
GL: try to fix v210 shader
refer to GH-359 It is expected that the value should been slightly above a pixel index, eg. 0.0001 for first and 1919.0001 for the last in FHD. However, using round (but not floor!) before converting the value to int seem to help, which would imply that the actual pixel value might have fallen below the actual pixel value. But in that case, replacing 0.4999 for 0.5 should not have helped, but it did (reverting the commit c243789).
1 parent 63339e8 commit 42456ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video_display/gl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ void main(void) {
196196
197197
// interpolate (0,1) texcoords to [0,719]
198198
int texcoordDenormX;
199-
texcoordDenormX = int(gl_TexCoord[0].x * imageWidth - .4999);
199+
texcoordDenormX = int(round(gl_TexCoord[0].x * imageWidth - .4999));
200200
201201
// 0 1 1 2 3 3 4 5 5 6 7 7 etc.
202202
int yOffset;

0 commit comments

Comments
 (0)