#line 1 "unknown"

#line 1 "D:\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\AspectRatio.fx"
#line 1 "D:\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\ReShadeUI.fxh"
#line 5 "D:\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\AspectRatio.fx"
#line 7
uniform float A <      ui_type = "slider"; 
ui_label = "Correct proportions";
ui_category = "Aspect ratio";
ui_min = -1.0; ui_max = 1.0;
> = 0.0;
#line 13
uniform float Zoom <      ui_type = "slider"; 
ui_label = "Scale image";
ui_category = "Aspect ratio";
ui_min = 1.0; ui_max = 1.5;
> = 1.0;
#line 19
uniform bool FitScreen <       ui_type = "input"; 
ui_label = "Scale image to borders";
ui_category = "Borders";
> = true;
#line 24
uniform float3 Color <      ui_type = "color"; 
ui_label = "Background color";
ui_category = "Borders";
> = float3(0.027, 0.027, 0.027);
#line 1 "D:\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\ReShade.fxh"
#line 50
namespace ReShade
{
#line 61
static const float AspectRatio = 2624 * (1.0 / 1568);
static const float2 PixelSize = float2((1.0 / 2624), (1.0 / 1568));
static const float2 ScreenSize = float2(2624, 1568);
#line 67
texture BackBufferTex : COLOR;
texture DepthBufferTex : DEPTH;
#line 70
sampler BackBuffer { Texture = BackBufferTex; };
sampler DepthBuffer { Texture = DepthBufferTex; };
#line 74
float GetLinearizedDepth(float2 texcoord)
{
#line 79
texcoord.x /=  1;
texcoord.y /=  1;
#line 84
texcoord.x -=  0 / 2.000000001;
#line 89
texcoord.y +=  0 / 2.000000001;
#line 91
float depth = tex2Dlod(DepthBuffer, float4(texcoord, 0, 0)).x *  1;
#line 100
const float N = 1.0;
depth /= 1000.0 - depth * (1000.0 - N);
#line 103
return depth;
}
}
#line 108
void PostProcessVS(in uint id : SV_VertexID, out float4 position : SV_Position, out float2 texcoord : TEXCOORD)
{
texcoord.x = (id == 2) ? 2.0 : 0.0;
texcoord.y = (id == 1) ? 2.0 : 0.0;
position = float4(texcoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);
}
#line 29 "D:\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\AspectRatio.fx"
#line 35
float3 AspectRatioPS(float4 pos : SV_Position, float2 coord : TEXCOORD) : SV_Target
{
bool Mask = false;
#line 40
coord -= 0.5;
#line 43
if (Zoom != 1.0) coord /= clamp(Zoom, 1.0, 1.5); 
#line 46
if (A<0)
{
coord.x *= abs(A)+1.0; 
#line 51
if (FitScreen) coord /= abs(A)+1.0;
else 
Mask = abs(coord.x)>0.5;
}
#line 56
else if (A>0)
{
coord.y *= A+1.0; 
#line 61
if (FitScreen) coord /= abs(A)+1.0;
else 
Mask = abs(coord.y)>0.5;
}
#line 67
coord += 0.5;
#line 70
return Mask? Color : tex2D(ReShade::BackBuffer, coord).rgb;
}
#line 78
technique AspectRatioPS
<
ui_label = "Aspect Ratio";
ui_tooltip = "Correct image aspect ratio";
>
{
pass
{
VertexShader = PostProcessVS;
PixelShader = AspectRatioPS;
}
}

