prevent rounding errors caused by floor()

This commit is contained in:
hizzlekizzle 2019-05-28 10:48:18 -05:00 committed by GitHub
parent 8cea816700
commit 79c95a5036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,7 +64,7 @@ void main()
vec2 g1 = vec2(inv_size.x,inv_size.y); vec2 g1 = vec2(inv_size.x,inv_size.y);
vec2 g2 = vec2(-inv_size.x,inv_size.y); vec2 g2 = vec2(-inv_size.x,inv_size.y);
vec2 pC4 = floor(OGL2Pos) * inv_size; vec2 pC4 = floor(OGL2Pos) * 1.0001 * inv_size;
// Reading the texels // Reading the texels
vec3 C1 = texture2d_(Source, pC4 - dy, yx); vec3 C1 = texture2d_(Source, pC4 - dy, yx);