#line 1 "unknown"

#line 1 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Layer.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 = 2828 * (1.0 / 1691);
static const float2 PixelSize = float2((1.0 / 2828), (1.0 / 1691));
static const float2 ScreenSize = float2(2828, 1691);
#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 27 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Layer.fx"
#line 1 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\ReShadeUI.fxh"
#line 45 "D:\Games\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Layer.fx"
#line 47
uniform float2 Layer_Pos <      ui_type = "drag"; 
ui_label = "Layer Position";
ui_min = 0.0; ui_max = 1.0;
ui_step = (1.0 / 200.0);
> = float2(0.5, 0.5);
#line 53
uniform float Layer_Scale <      ui_type = "drag"; 
ui_label = "Layer Scale";
ui_min = (1.0 / 100.0); ui_max = 4.0;
ui_step = (1.0 / 250.0);
> = 1.0;
#line 59
uniform float Layer_Blend <      ui_type = "color";
ui_label = "Layer Blend";
ui_tooltip = "How much to blend layer with the original image.";
ui_min = 0.0; ui_max = 1.0;
ui_step = (1.0 / 255.0); 
> = 1.0;
#line 66
texture Layer_Tex <
source =  "Layer.png";
> {
Format =  RGBA8;
Width  =  1280;
Height =  720;
};
#line 74
sampler Layer_Sampler
{
Texture  = Layer_Tex;
AddressU = BORDER;
AddressV = BORDER;
};
#line 81
void PS_Layer(float4 pos : SV_Position, float2 texCoord : TEXCOORD, out float4 passColor : SV_Target)
{
const float4 backColor = tex2D(ReShade::BackBuffer, texCoord);
const float2 pixelSize = 1.0 / (float2( 1280,  720) * Layer_Scale /  float2(2828, 1691));
const float4 layer     = tex2D(Layer_Sampler, texCoord * pixelSize + Layer_Pos * (1.0 - pixelSize));
#line 87
passColor   = lerp(backColor, layer, layer.a * Layer_Blend);
passColor.a = backColor.a;
}
#line 91
technique Layer
{
pass
{
VertexShader = PostProcessVS;
PixelShader  = PS_Layer;
}
}

