mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
Fix gbpass scaling misalignment
This commit is contained in:
parent
2a80829d45
commit
f9d9c9724c
|
@ -78,15 +78,12 @@ layout(location = 3) out vec2 one_texel;
|
|||
// Size of the scaled video
|
||||
//#define scaled_video_out (registers.SourceSize.xy * vec2(video_scale)) <- moved to parameter
|
||||
|
||||
//it's... half a pixel
|
||||
#define half_pixel (vec2(0.5) * registers.OutputSize.zw)
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 scaled_video_out = (registers.SourceSize.xy * vec2(registers.video_scale));
|
||||
// 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;
|
||||
dot_size = registers.SourceSize.zw;
|
||||
one_texel = 1.0 / (registers.SourceSize.xy * registers.video_scale);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue