mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 01:11:32 +11:00
prevent rounding errors with deinterlacing shaders
This commit is contained in:
parent
e4f6e62bf1
commit
994fc49f12
|
@ -53,7 +53,7 @@ void main()
|
|||
}
|
||||
else
|
||||
{
|
||||
y = 2.0 * params.SourceSize.y * vTexCoord.y;
|
||||
y = 2.000001 * params.SourceSize.y * vTexCoord.y;
|
||||
prev = current;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ void main()
|
|||
float y = 0.0;
|
||||
// assume anything with a vertical resolution greater than 400 lines is interlaced
|
||||
if (params.SourceSize.y > 400.0) y = params.SourceSize.y * vTexCoord.y + float(params.FrameCount);
|
||||
else y = 2.0 * params.SourceSize.y * vTexCoord.y;
|
||||
else y = 2.000001 * params.SourceSize.y * vTexCoord.y;
|
||||
|
||||
if (mod(y, 2.0) > 0.99999) FragColor = vec4(texture(Source, vTexCoord + vec2(0.0, params.SourceSize.w)));
|
||||
else
|
||||
|
|
|
@ -55,7 +55,7 @@ void main()
|
|||
if (registers.SourceSize.y > 400.0)
|
||||
{y = registers.SourceSize.y * vTexCoord.y + (tick * registers.enable_480i) + registers.top_field_first;}
|
||||
else
|
||||
{y = 2.0 * registers.SourceSize.y * vTexCoord.y + registers.top_field_first;}
|
||||
{y = 2.000001 * registers.SourceSize.y * vTexCoord.y + registers.top_field_first;}
|
||||
|
||||
if (mod(y, 1.99999) > 0.99999)
|
||||
{res = res;}
|
||||
|
|
Loading…
Reference in a new issue