Add some shaders and update others. (#3234)

- Add fxaa.fx, aa-shader-40.fx, bilateral.fx;
- Update geom.fx, crt-geom.fx, bicubic.fx, lanczos3.fx, super-xbr.fx.
This commit is contained in:
Hyllian
2024-06-26 23:37:02 -03:00
committed by GitHub
parent ebf50edb79
commit ad27f8bac3
8 changed files with 581 additions and 38 deletions

View File

@ -86,7 +86,7 @@ float3 bicubic_ar(float fp, float3 C0, float3 C1, float3 C2, float3 C3)
}
float4 Bicubic_X(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
float4 PS_Bicubic_X(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
{
// Both dimensions are unfiltered, so it looks for lores pixels.
float2 ps = NormalizedNativePixelSize;
@ -106,7 +106,7 @@ float4 Bicubic_X(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
}
float4 Bicubic_Y(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
float4 PS_Bicubic_Y(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
{
// One must be careful here. Horizontal dimension is already filtered, so it looks for x in hires.
float2 ps = float2(1.0/(ViewportSize.x*BufferToViewportRatio.x), NormalizedNativePixelSize.y);
@ -128,16 +128,16 @@ float4 Bicubic_Y(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
technique Bicubic
{
pass PS_Bicubic_X
pass
{
VertexShader = PostProcessVS;
PixelShader = Bicubic_X;
PixelShader = PS_Bicubic_X;
RenderTarget = tBicubic_P0;
}
pass PS_Bicubic_Y
pass
{
VertexShader = PostProcessVS;
PixelShader = Bicubic_Y;
PixelShader = PS_Bicubic_Y;
}
}

View File

@ -79,7 +79,7 @@ float3 lanczos3ar(float fp, float3 C0, float3 C1, float3 C2, float3 C3, float3 C
}
float4 Lanczos3_X(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
float4 PS_Lanczos3_X(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
{
// Both dimensions are unfiltered, so it looks for lores pixels.
float2 ps = NormalizedNativePixelSize;
@ -103,7 +103,7 @@ float4 Lanczos3_X(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
}
float4 Lanczos3_Y(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
float4 PS_Lanczos3_Y(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
{
// One must be careful here. Horizontal dimension is already filtered, so it looks for x in hires.
float2 ps = float2(1.0/(ViewportSize.x*BufferToViewportRatio.x), NormalizedNativePixelSize.y);
@ -129,16 +129,16 @@ float4 Lanczos3_Y(float4 pos: SV_Position, float2 uv_tx : TEXCOORD) : SV_Target
technique Lanczos3
{
pass PS_Lanczos3_X
pass
{
VertexShader = PostProcessVS;
PixelShader = Lanczos3_X;
PixelShader = PS_Lanczos3_X;
RenderTarget = tLanczos3_P0;
}
pass PS_Lanczos3_Y
pass
{
VertexShader = PostProcessVS;
PixelShader = Lanczos3_Y;
PixelShader = PS_Lanczos3_Y;
}
}