#line 1 "unknown"

#line 1 "C:\GOG Games\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Splitscreen.fx"
#line 1 "C:\GOG Games\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\ReShadeUI.fxh"
#line 35 "C:\GOG Games\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Splitscreen.fx"
#line 37
uniform int splitscreen_mode <
ui_type = "combo";
ui_label = "Mode";
ui_tooltip = "Choose a mode";
#line 42
ui_items =
"Vertical 50/50 split\0"
"Vertical 25/50/25 split\0"
"Angled 50/50 split\0"
"Angled 25/50/25 split\0"
"Horizontal 50/50 split\0"
"Horizontal 25/50/25 split\0"
"Diagonal split\0"
;
> = 0;
#line 1 "C:\GOG Games\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 = 720 * (1.0 / 701);
static const float2 PixelSize = float2((1.0 / 720), (1.0 / 701));
static const float2 ScreenSize = float2(720, 701);
#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 57 "C:\GOG Games\The.Elder.Scrolls.V.Skyrim.VR.v1.4.0.15.8\The Elder Scrolls V Skyrim VR\reshade-shaders\Shaders\Splitscreen.fx"
#line 64
texture Before { Width = 720; Height = 701; };
sampler Before_sampler { Texture = Before; };
#line 72
float4 PS_Before(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
return tex2D(ReShade::BackBuffer, texcoord);
}
#line 77
float4 PS_After(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
float4 color;
#line 82
[branch] if (splitscreen_mode == 0)
color = (texcoord.x < 0.5 ) ? tex2D(Before_sampler, texcoord) : tex2D(ReShade::BackBuffer, texcoord);
#line 86
[branch] if (splitscreen_mode == 1)
{
#line 89
float dist = abs(texcoord.x - 0.5);
#line 92
dist = saturate(dist - 0.25);
#line 94
color = dist ? tex2D(Before_sampler, texcoord) : tex2D(ReShade::BackBuffer, texcoord);
}
#line 98
[branch] if (splitscreen_mode == 2)
{
#line 101
float dist = ((texcoord.x - 3.0/8.0) + (texcoord.y * 0.25));
#line 104
dist = saturate(dist - 0.25);
#line 106
color = dist ? tex2D(ReShade::BackBuffer, texcoord) : tex2D(Before_sampler, texcoord);
}
#line 110
[branch] if (splitscreen_mode == 3)
{
#line 113
float dist = ((texcoord.x - 3.0/8.0) + (texcoord.y * 0.25));
#line 115
dist = abs(dist - 0.25);
#line 118
dist = saturate(dist - 0.25);
#line 120
color = dist ? tex2D(Before_sampler, texcoord) : tex2D(ReShade::BackBuffer, texcoord);
}
#line 124
[branch] if (splitscreen_mode == 4)
color =  (texcoord.y < 0.5) ? tex2D(Before_sampler, texcoord) : tex2D(ReShade::BackBuffer, texcoord);
#line 128
[branch] if (splitscreen_mode == 5)
{
#line 131
float dist = abs(texcoord.y - 0.5);
#line 134
dist = saturate(dist - 0.25);
#line 136
color = dist ? tex2D(Before_sampler, texcoord) : tex2D(ReShade::BackBuffer, texcoord);
}
#line 140
[branch] if (splitscreen_mode == 6)
{
#line 143
float dist = (texcoord.x + texcoord.y);
#line 148
color = (dist < 1.0) ? tex2D(Before_sampler, texcoord) : tex2D(ReShade::BackBuffer, texcoord);
}
#line 151
return color;
}
#line 159
technique Before
{
pass
{
VertexShader = PostProcessVS;
PixelShader = PS_Before;
RenderTarget = Before;
}
}
#line 169
technique After
{
pass
{
VertexShader = PostProcessVS;
PixelShader = PS_After;
}
}

