GL: fixed irregular sized v210 display

fixed `-d gl` of `-t testcard:size=47x32:codec=v210` or `..size=48x32`

The problem was perhaps with truncation of a number slightly below
nearest integer. Result was a "broken" bar of a testcard (in midst it
was shifted by one horizontal pixel).

Quite a huge eps is needed in macOS - .49999 cut-off was not sufficient
for `size=$((48*53))x$((32*53))`.
This commit is contained in:
Martin Pulec
2022-11-15 13:57:41 +01:00
parent 5763273636
commit c2437894fa

View File

@@ -196,7 +196,7 @@ void main(void) {
// interpolate (0,1) texcoords to [0,719]
int texcoordDenormX;
texcoordDenormX = int(gl_TexCoord[0].x * imageWidth - .5);
texcoordDenormX = int(gl_TexCoord[0].x * imageWidth - .4999);
// 0 1 1 2 3 3 4 5 5 6 7 7 etc.
int yOffset;