mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 21:40:30 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user