- already fixed scanline issue also applied for swapped orientation (nw)
parent
0e799e0b98
commit
7dc76d6501
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -273,14 +273,11 @@ VS_OUTPUT vs_main(VS_INPUT Input)
|
|||
|
||||
Output.Color = Input.Color;
|
||||
|
||||
float2 TexCoord = Input.TexCoord;
|
||||
TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
|
||||
Output.TexCoord = Input.TexCoord;
|
||||
Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
|
||||
|
||||
Output.TexCoord = TexCoord.xy;
|
||||
|
||||
TexCoord += 0.5f / SourceDims;
|
||||
|
||||
Output.BloomCoord = TexCoord.xy;
|
||||
Output.BloomCoord = Output.TexCoord;
|
||||
Output.BloomCoord += 0.5f / SourceDims;
|
||||
|
||||
return Output;
|
||||
}
|
||||
|
|
10
hlsl/post.fx
10
hlsl/post.fx
|
@ -253,9 +253,13 @@ float4 ps_main(PS_INPUT Input) : COLOR
|
|||
float ColorBrightness = 0.299f * BaseColor.r + 0.587f * BaseColor.g + 0.114 * BaseColor.b;
|
||||
|
||||
float ScanlineCoord = SourceCoord.y;
|
||||
ScanlineCoord += QuadDims.y <= SourceDims.y * 2.0f
|
||||
? 0.5f / QuadDims.y // uncenter scanlines if the quad is less than twice the size of the source
|
||||
: 0.0f;
|
||||
ScanlineCoord += SwapXY
|
||||
? QuadDims.x <= SourceDims.x * 2.0f
|
||||
? 0.5f / QuadDims.x // uncenter scanlines if the quad is less than twice the size of the source
|
||||
: 0.0f
|
||||
: QuadDims.y <= SourceDims.y * 2.0f
|
||||
? 0.5f / QuadDims.y // uncenter scanlines if the quad is less than twice the size of the source
|
||||
: 0.0f;
|
||||
|
||||
ScanlineCoord *= SourceDims.y * ScanlineScale * PI;
|
||||
|
||||
|
|
|
@ -149,9 +149,13 @@ void main()
|
|||
float ColorBrightness = 0.299 * BaseColor.r + 0.587 * BaseColor.g + 0.114 * BaseColor.b;
|
||||
|
||||
float ScanCoord = BaseCoord.y;
|
||||
ScanCoord += u_quad_dims.y <= u_source_dims.y * 2.0f
|
||||
? 0.5f / u_quad_dims.y // uncenter scanlines if the quad is less than twice the size of the source
|
||||
: 0.0f;
|
||||
ScanCoord += u_swap_xy.x > 0.0
|
||||
? u_quad_dims.x <= u_source_dims.x * 2.0
|
||||
? 0.5 / u_quad_dims.x // uncenter scanlines if the quad is less than twice the size of the source
|
||||
: 0.0
|
||||
: u_quad_dims.y <= u_source_dims.y * 2.0
|
||||
? 0.5 / u_quad_dims.y // uncenter scanlines if the quad is less than twice the size of the source
|
||||
: 0.0;
|
||||
|
||||
ScanCoord *= u_source_dims.y * u_scanline_scale.x * 3.1415927; // PI
|
||||
|
||||
|
|
Loading…
Reference in New Issue