mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
prevent rounding errors caused by floor()
This commit is contained in:
parent
8cea816700
commit
79c95a5036
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue