#line 1 "unknown"

#line 1 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Border.fx"
#line 1 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\ReShade.fxh"
#line 50
namespace ReShade
{
#line 61
static const float AspectRatio = 2646 * (1.0 / 1583);
static const float2 PixelSize = float2((1.0 / 2646), (1.0 / 1583));
static const float2 ScreenSize = float2(2646, 1583);
#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 18 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Border.fx"
#line 1 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\ReShadeUI.fxh"
#line 19 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Border.fx"
#line 29
uniform float2 border_width <
ui_type = "drag";
ui_label = "Size";
ui_tooltip = "Measured in pixels. If this is set to zero then the ratio will be used instead.";
ui_min = 0.0; ui_max = (2646 * 0.5);
ui_step = 1.0;
> = float2(0.0, 0.0);
#line 37
uniform float border_ratio <
ui_type = "input";
ui_label = "Size Ratio";
ui_tooltip = "Set the desired ratio for the visible area.";
> = 2.35;
#line 43
uniform float3 border_color <
ui_type = "color";
ui_label = "Border Color";
> = float3(0.0, 0.0, 0.0);
#line 48
float3 BorderPass(float4 vpos : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb;
#line 53
float2 border_width_variable = border_width;
if (border_width.x == -border_width.y) 
if ( (2646 * (1.0 / 1583)) < border_ratio)
border_width_variable = float2(0.0, (1583 - (2646 / border_ratio)) * 0.5);
else
border_width_variable = float2((2646 - (1583 * border_ratio)) * 0.5, 0.0);
#line 60
float2 border = ( float2((1.0 / 2646), (1.0 / 1583)) * border_width_variable); 
float2 within_border = saturate((-texcoord * texcoord + texcoord) - (-border * border + border)); 
#line 63
return all(within_border) ? color : border_color;
}
#line 66
technique Border
{
pass
{
VertexShader = PostProcessVS;
PixelShader = BorderPass;
}
}

