mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
add tiny offset to gb shader coords to prevent rounding issues
This commit is contained in:
parent
0513ebd358
commit
e179039cbc
|
@ -87,7 +87,7 @@ void main()
|
|||
vec2 scaled_video_out = (registers.SourceSize.xy * vec2(video_scale_factor));
|
||||
// Remaps position to integer scaled output
|
||||
gl_Position = global.MVP * Position / vec4( vec2(registers.OutputSize.xy / scaled_video_out), 1.0, 1.0 );
|
||||
vTexCoord = TexCoord;// + half_pixel;
|
||||
vTexCoord = TexCoord * 1.0001;// + half_pixel;
|
||||
dot_size = registers.SourceSize.zw;
|
||||
one_texel = 1.0 / (registers.SourceSize.xy * video_scale_factor);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ layout(location = 7) out vec2 blur_coords_upper_bound;
|
|||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
vTexCoord = TexCoord * 1.0001;
|
||||
|
||||
texel = registers.SourceSize.zw;
|
||||
blur_coords_down = vTexCoord + vec2(0.0, texel.y);
|
||||
|
|
|
@ -44,7 +44,7 @@ layout(location = 3) out vec2 upper_bound;
|
|||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
vTexCoord = TexCoord * 1.0001;
|
||||
|
||||
texel = registers.SourceSize.zw;
|
||||
lower_bound = vec2(0.0);
|
||||
|
|
|
@ -44,7 +44,7 @@ layout(location = 3) out vec2 upper_bound;
|
|||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
vTexCoord = TexCoord * 1.0001;
|
||||
|
||||
texel = registers.SourceSize.zw;
|
||||
lower_bound = vec2(0.0);
|
||||
|
|
|
@ -90,7 +90,7 @@ layout(location = 1) out vec2 texel;
|
|||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
vTexCoord = TexCoord * 1.0001;
|
||||
|
||||
texel = registers.SourceSize.zw;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue