Files
BlockSpace-v1.5.0b/Assets/Shader/Hidden_Universal Render Pipeline_GaussianDepthOfField.shader
2026-06-01 17:19:55 +02:00

2045 lines
99 KiB
GLSL

Shader "Hidden/Universal Render Pipeline/GaussianDepthOfField"
{
Properties
{
}
SubShader
{
LOD 100
Tags { "RenderPipeline" = "UniversalPipeline" }
Pass
{
Name "Gaussian Depth Of Field CoC"
LOD 100
Tags { "RenderPipeline" = "UniversalPipeline" }
ZTest Always
ZWrite Off
Cull Off
GpuProgramID 48737
HLSLPROGRAM
// https://docs.unity3d.com/Manual/SL-PragmaDirectives.html
#pragma vertex vert
#pragma fragment frag
#pragma target 4.0
#pragma multi_compile _ STEREO_INSTANCING_ON
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[132];
static float4 gl_Position;
static int gl_VertexIndex;
static int gl_BaseVertexARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
};
void vert_main()
{
float vertex_unnamed_32 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_33 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_32, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_33, 2.0f, -1.0f);
precise float vertex_unnamed_43 = (-0.0f) - vertex_unnamed_33;
precise float vertex_unnamed_45 = vertex_unnamed_43 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_32, vertex_uniform_buffer_0[131u].x, vertex_uniform_buffer_0[131u].z);
vertex_output_1.y = mad(vertex_unnamed_45, vertex_uniform_buffer_0[131u].y, vertex_uniform_buffer_0[131u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[131] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[101];
static float4 gl_Position;
static uint gl_Layer;
static int gl_VertexIndex;
static int gl_InstanceIndex;
static int gl_BaseVertexARB;
static int gl_BaseInstanceARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_InstanceIndex : SV_InstanceID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
uint gl_BaseInstanceARB : SV_StartInstanceLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
uint gl_Layer : SV_RenderTargetArrayIndex;
};
void vert_main()
{
float vertex_unnamed_35 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_36 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_35, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_36, 2.0f, -1.0f);
precise float vertex_unnamed_46 = (-0.0f) - vertex_unnamed_36;
precise float vertex_unnamed_48 = vertex_unnamed_46 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_35, vertex_uniform_buffer_0[100u].x, vertex_uniform_buffer_0[100u].z);
vertex_output_1.y = mad(vertex_unnamed_48, vertex_uniform_buffer_0[100u].y, vertex_uniform_buffer_0[100u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
gl_Layer = int((uint(gl_InstanceIndex) - uint(gl_BaseInstanceARB)) & 1u);
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[100] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_InstanceIndex = int(stage_input.gl_InstanceIndex + stage_input.gl_BaseInstanceARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
gl_BaseInstanceARB = stage_input.gl_BaseInstanceARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.gl_Layer = gl_Layer;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _ZBufferParams;
float4 _SourceSize;
float3 _CoCParams;
static float4 fragment_uniform_buffer_0[140];
Texture2D<float4> _CameraDepthTexture;
static float2 fragment_input_1;
static float fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_37 = fragment_input_1.x * fragment_uniform_buffer_0[137u].x;
precise float fragment_unnamed_38 = fragment_input_1.y * fragment_uniform_buffer_0[137u].y;
precise float fragment_unnamed_54 = 1.0f / mad(fragment_uniform_buffer_0[24u].z, _CameraDepthTexture.Load(int3(uint2(uint(int(fragment_unnamed_37)), uint(int(fragment_unnamed_38))), 0u)).x, fragment_uniform_buffer_0[24u].w);
precise float fragment_unnamed_60 = (-0.0f) - fragment_uniform_buffer_0[139u].x;
precise float fragment_unnamed_62 = fragment_unnamed_54 + fragment_unnamed_60;
precise float fragment_unnamed_66 = (-0.0f) - fragment_uniform_buffer_0[139u].x;
precise float fragment_unnamed_70 = fragment_unnamed_66 + fragment_uniform_buffer_0[139u].y;
precise float fragment_unnamed_71 = fragment_unnamed_62 / fragment_unnamed_70;
fragment_output_0 = clamp(fragment_unnamed_71, 0.0f, 1.0f);
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[24] = float4(_ZBufferParams[0], _ZBufferParams[1], _ZBufferParams[2], _ZBufferParams[3]);
fragment_uniform_buffer_0[137] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[139] = float4(_CoCParams[0], _CoCParams[1], _CoCParams[2], fragment_uniform_buffer_0[139][3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _ZBufferParams;
float4 _SourceSize;
float3 _CoCParams;
static float4 fragment_uniform_buffer_0[109];
Texture2DArray<float4> _CameraDepthTexture;
static uint gl_Layer;
static float2 fragment_input_1;
static float fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_39 = fragment_input_1.x * fragment_uniform_buffer_0[106u].x;
precise float fragment_unnamed_40 = fragment_input_1.y * fragment_uniform_buffer_0[106u].y;
precise float fragment_unnamed_57 = 1.0f / mad(fragment_uniform_buffer_0[23u].z, _CameraDepthTexture.Load(int4(uint3(uint(int(fragment_unnamed_39)), uint(int(fragment_unnamed_40)), uint(gl_Layer)), 0u)).x, fragment_uniform_buffer_0[23u].w);
precise float fragment_unnamed_63 = (-0.0f) - fragment_uniform_buffer_0[108u].x;
precise float fragment_unnamed_65 = fragment_unnamed_57 + fragment_unnamed_63;
precise float fragment_unnamed_69 = (-0.0f) - fragment_uniform_buffer_0[108u].x;
precise float fragment_unnamed_73 = fragment_unnamed_69 + fragment_uniform_buffer_0[108u].y;
precise float fragment_unnamed_74 = fragment_unnamed_65 / fragment_unnamed_73;
fragment_output_0 = clamp(fragment_unnamed_74, 0.0f, 1.0f);
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[23] = float4(_ZBufferParams[0], _ZBufferParams[1], _ZBufferParams[2], _ZBufferParams[3]);
fragment_uniform_buffer_0[106] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[108] = float4(_CoCParams[0], _CoCParams[1], _CoCParams[2], fragment_uniform_buffer_0[108][3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
ENDHLSL
}
Pass
{
Name "Gaussian Depth Of Field Prefilter"
LOD 100
Tags { "RenderPipeline" = "UniversalPipeline" }
ZTest Always
ZWrite Off
Cull Off
GpuProgramID 66340
HLSLPROGRAM
// https://docs.unity3d.com/Manual/SL-PragmaDirectives.html
#pragma vertex vert
#pragma fragment frag
#pragma target 4.0
#pragma multi_compile _ STEREO_INSTANCING_ON
#pragma multi_compile _ _HIGH_QUALITY_SAMPLING
#ifndef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[132];
static float4 gl_Position;
static int gl_VertexIndex;
static int gl_BaseVertexARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
};
void vert_main()
{
float vertex_unnamed_32 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_33 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_32, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_33, 2.0f, -1.0f);
precise float vertex_unnamed_43 = (-0.0f) - vertex_unnamed_33;
precise float vertex_unnamed_45 = vertex_unnamed_43 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_32, vertex_uniform_buffer_0[131u].x, vertex_uniform_buffer_0[131u].z);
vertex_output_1.y = mad(vertex_unnamed_45, vertex_uniform_buffer_0[131u].y, vertex_uniform_buffer_0[131u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[131] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifdef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[101];
static float4 gl_Position;
static uint gl_Layer;
static int gl_VertexIndex;
static int gl_InstanceIndex;
static int gl_BaseVertexARB;
static int gl_BaseInstanceARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_InstanceIndex : SV_InstanceID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
uint gl_BaseInstanceARB : SV_StartInstanceLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
uint gl_Layer : SV_RenderTargetArrayIndex;
};
void vert_main()
{
float vertex_unnamed_35 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_36 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_35, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_36, 2.0f, -1.0f);
precise float vertex_unnamed_46 = (-0.0f) - vertex_unnamed_36;
precise float vertex_unnamed_48 = vertex_unnamed_46 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_35, vertex_uniform_buffer_0[100u].x, vertex_uniform_buffer_0[100u].z);
vertex_output_1.y = mad(vertex_unnamed_48, vertex_uniform_buffer_0[100u].y, vertex_uniform_buffer_0[100u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
gl_Layer = int((uint(gl_InstanceIndex) - uint(gl_BaseInstanceARB)) & 1u);
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[100] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_InstanceIndex = int(stage_input.gl_InstanceIndex + stage_input.gl_BaseInstanceARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
gl_BaseInstanceARB = stage_input.gl_BaseInstanceARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.gl_Layer = gl_Layer;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifndef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float2 _GlobalMipBias;
static float4 fragment_uniform_buffer_0[5];
Texture2D<float4> _BlitTexture;
Texture2D<float4> _FullCoCTexture;
SamplerState S0;
static float2 fragment_input_1;
static float fragment_output_0;
static float4 fragment_output_1;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float fragment_output_0 : SV_Target0;
float4 fragment_output_1 : SV_Target1;
};
void frag_main()
{
float4 fragment_unnamed_46 = _FullCoCTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_48 = fragment_unnamed_46.x;
fragment_output_0 = fragment_unnamed_48;
float4 fragment_unnamed_57 = _BlitTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_62 = fragment_unnamed_48 * fragment_unnamed_57.x;
precise float fragment_unnamed_63 = fragment_unnamed_48 * fragment_unnamed_57.y;
precise float fragment_unnamed_64 = fragment_unnamed_48 * fragment_unnamed_57.z;
fragment_output_1.x = fragment_unnamed_62;
fragment_output_1.y = fragment_unnamed_63;
fragment_output_1.z = fragment_unnamed_64;
fragment_output_1.w = 0.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[4] = float4(_GlobalMipBias[0], _GlobalMipBias[1], fragment_uniform_buffer_0[4][2], fragment_uniform_buffer_0[4][3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
stage_output.fragment_output_1 = fragment_output_1;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifdef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float2 _GlobalMipBias;
static float4 fragment_uniform_buffer_0[5];
Texture2DArray<float4> _BlitTexture;
Texture2DArray<float4> _FullCoCTexture;
SamplerState S0;
static uint gl_Layer;
static float2 fragment_input_1;
static float fragment_output_0;
static float4 fragment_output_1;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float fragment_output_0 : SV_Target0;
float4 fragment_output_1 : SV_Target1;
};
void frag_main()
{
float fragment_unnamed_35 = float(uint(gl_Layer));
float4 fragment_unnamed_50 = _FullCoCTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_35), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_53 = fragment_unnamed_50.x;
float4 fragment_unnamed_58 = _BlitTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_35), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_63 = fragment_unnamed_53 * fragment_unnamed_58.x;
precise float fragment_unnamed_64 = fragment_unnamed_53 * fragment_unnamed_58.y;
precise float fragment_unnamed_65 = fragment_unnamed_53 * fragment_unnamed_58.z;
fragment_output_1.x = fragment_unnamed_63;
fragment_output_1.y = fragment_unnamed_64;
fragment_output_1.z = fragment_unnamed_65;
fragment_output_0 = fragment_unnamed_53;
fragment_output_1.w = 0.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[4] = float4(_GlobalMipBias[0], _GlobalMipBias[1], fragment_uniform_buffer_0[4][2], fragment_uniform_buffer_0[4][3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
stage_output.fragment_output_1 = fragment_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifdef _HIGH_QUALITY_SAMPLING
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
static float4 fragment_uniform_buffer_0[138];
Texture2D<float4> _BlitTexture;
Texture2D<float4> _FullCoCTexture;
SamplerState S0;
static float2 fragment_input_1;
static float fragment_output_0;
static float4 fragment_output_1;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float fragment_output_0 : SV_Target0;
float4 fragment_output_1 : SV_Target1;
};
void frag_main()
{
float4 fragment_unnamed_46 = _FullCoCTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_48 = fragment_unnamed_46.x;
float fragment_unnamed_59 = mad(fragment_uniform_buffer_0[137u].z, 0.89999997615814208984375f, fragment_input_1.x);
float fragment_unnamed_61 = mad(fragment_uniform_buffer_0[137u].w, -0.4000000059604644775390625f, fragment_input_1.y);
float fragment_unnamed_63 = mad(fragment_uniform_buffer_0[137u].z, -0.89999997615814208984375f, fragment_input_1.x);
float fragment_unnamed_65 = mad(fragment_uniform_buffer_0[137u].w, 0.4000000059604644775390625f, fragment_input_1.y);
float4 fragment_unnamed_70 = _FullCoCTexture.SampleBias(S0, float2(fragment_unnamed_59, fragment_unnamed_61), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_72 = fragment_unnamed_70.x;
precise float fragment_unnamed_73 = fragment_unnamed_48 + fragment_unnamed_72;
float4 fragment_unnamed_77 = _FullCoCTexture.SampleBias(S0, float2(fragment_unnamed_63, fragment_unnamed_65), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_79 = fragment_unnamed_77.x;
precise float fragment_unnamed_80 = fragment_unnamed_73 + fragment_unnamed_79;
float fragment_unnamed_89 = mad(fragment_uniform_buffer_0[137u].z, 0.4000000059604644775390625f, fragment_input_1.x);
float fragment_unnamed_90 = mad(fragment_uniform_buffer_0[137u].w, 0.89999997615814208984375f, fragment_input_1.y);
float fragment_unnamed_91 = mad(fragment_uniform_buffer_0[137u].z, -0.4000000059604644775390625f, fragment_input_1.x);
float fragment_unnamed_92 = mad(fragment_uniform_buffer_0[137u].w, -0.89999997615814208984375f, fragment_input_1.y);
float4 fragment_unnamed_96 = _FullCoCTexture.SampleBias(S0, float2(fragment_unnamed_89, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_98 = fragment_unnamed_96.x;
precise float fragment_unnamed_99 = fragment_unnamed_80 + fragment_unnamed_98;
float4 fragment_unnamed_103 = _FullCoCTexture.SampleBias(S0, float2(fragment_unnamed_91, fragment_unnamed_92), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_105 = fragment_unnamed_103.x;
precise float fragment_unnamed_106 = fragment_unnamed_99 + fragment_unnamed_105;
precise float fragment_unnamed_107 = fragment_unnamed_106 * 0.20000000298023223876953125f;
fragment_output_0 = fragment_unnamed_107;
float4 fragment_unnamed_113 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_59, fragment_unnamed_61), fragment_uniform_buffer_0[4u].x);
float4 fragment_unnamed_121 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_63, fragment_unnamed_65), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_126 = fragment_unnamed_72 * fragment_unnamed_113.x;
precise float fragment_unnamed_127 = fragment_unnamed_72 * fragment_unnamed_113.y;
precise float fragment_unnamed_128 = fragment_unnamed_72 * fragment_unnamed_113.z;
float4 fragment_unnamed_136 = _BlitTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
float4 fragment_unnamed_150 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_89, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
float4 fragment_unnamed_158 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_91, fragment_unnamed_92), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_169 = mad(fragment_unnamed_158.x, fragment_unnamed_105, mad(fragment_unnamed_150.x, fragment_unnamed_98, mad(fragment_unnamed_121.x, fragment_unnamed_79, mad(fragment_unnamed_136.x, fragment_unnamed_48, fragment_unnamed_126)))) * 0.20000000298023223876953125f;
precise float fragment_unnamed_170 = mad(fragment_unnamed_158.y, fragment_unnamed_105, mad(fragment_unnamed_150.y, fragment_unnamed_98, mad(fragment_unnamed_121.y, fragment_unnamed_79, mad(fragment_unnamed_136.y, fragment_unnamed_48, fragment_unnamed_127)))) * 0.20000000298023223876953125f;
precise float fragment_unnamed_171 = mad(fragment_unnamed_158.z, fragment_unnamed_105, mad(fragment_unnamed_150.z, fragment_unnamed_98, mad(fragment_unnamed_121.z, fragment_unnamed_79, mad(fragment_unnamed_136.z, fragment_unnamed_48, fragment_unnamed_128)))) * 0.20000000298023223876953125f;
fragment_output_1.x = fragment_unnamed_169;
fragment_output_1.y = fragment_unnamed_170;
fragment_output_1.z = fragment_unnamed_171;
fragment_output_1.w = 0.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[137] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
stage_output.fragment_output_1 = fragment_output_1;
return stage_output;
}
#endif // _HIGH_QUALITY_SAMPLING
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#ifdef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
static float4 fragment_uniform_buffer_0[107];
Texture2DArray<float4> _BlitTexture;
Texture2DArray<float4> _FullCoCTexture;
SamplerState S0;
static uint gl_Layer;
static float2 fragment_input_1;
static float fragment_output_0;
static float4 fragment_output_1;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float fragment_output_0 : SV_Target0;
float4 fragment_output_1 : SV_Target1;
};
void frag_main()
{
float fragment_unnamed_42 = float(uint(gl_Layer));
float4 fragment_unnamed_50 = _FullCoCTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_53 = fragment_unnamed_50.x;
float4 fragment_unnamed_58 = _BlitTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_73 = mad(fragment_uniform_buffer_0[106u].z, -0.89999997615814208984375f, fragment_input_1.x);
float fragment_unnamed_75 = mad(fragment_uniform_buffer_0[106u].w, 0.4000000059604644775390625f, fragment_input_1.y);
float fragment_unnamed_77 = mad(fragment_uniform_buffer_0[106u].z, 0.89999997615814208984375f, fragment_input_1.x);
float fragment_unnamed_79 = mad(fragment_uniform_buffer_0[106u].w, -0.4000000059604644775390625f, fragment_input_1.y);
float4 fragment_unnamed_84 = _FullCoCTexture.SampleBias(S0, float3(fragment_unnamed_77, fragment_unnamed_79, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_86 = fragment_unnamed_84.x;
float4 fragment_unnamed_90 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_77, fragment_unnamed_79, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_95 = fragment_unnamed_86 * fragment_unnamed_90.x;
precise float fragment_unnamed_96 = fragment_unnamed_86 * fragment_unnamed_90.y;
precise float fragment_unnamed_97 = fragment_unnamed_86 * fragment_unnamed_90.z;
precise float fragment_unnamed_98 = fragment_unnamed_53 + fragment_unnamed_86;
float4 fragment_unnamed_105 = _FullCoCTexture.SampleBias(S0, float3(fragment_unnamed_73, fragment_unnamed_75, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_107 = fragment_unnamed_105.x;
float4 fragment_unnamed_111 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_73, fragment_unnamed_75, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_119 = fragment_unnamed_98 + fragment_unnamed_107;
float fragment_unnamed_128 = mad(fragment_uniform_buffer_0[106u].z, -0.4000000059604644775390625f, fragment_input_1.x);
float fragment_unnamed_129 = mad(fragment_uniform_buffer_0[106u].w, -0.89999997615814208984375f, fragment_input_1.y);
float fragment_unnamed_130 = mad(fragment_uniform_buffer_0[106u].z, 0.4000000059604644775390625f, fragment_input_1.x);
float fragment_unnamed_131 = mad(fragment_uniform_buffer_0[106u].w, 0.89999997615814208984375f, fragment_input_1.y);
float4 fragment_unnamed_135 = _FullCoCTexture.SampleBias(S0, float3(fragment_unnamed_130, fragment_unnamed_131, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_137 = fragment_unnamed_135.x;
float4 fragment_unnamed_141 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_130, fragment_unnamed_131, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_149 = fragment_unnamed_119 + fragment_unnamed_137;
float4 fragment_unnamed_153 = _FullCoCTexture.SampleBias(S0, float3(fragment_unnamed_128, fragment_unnamed_129, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_155 = fragment_unnamed_153.x;
float4 fragment_unnamed_159 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_128, fragment_unnamed_129, fragment_unnamed_42), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_167 = fragment_unnamed_149 + fragment_unnamed_155;
precise float fragment_unnamed_168 = fragment_unnamed_167 * 0.20000000298023223876953125f;
fragment_output_0 = fragment_unnamed_168;
precise float fragment_unnamed_170 = mad(fragment_unnamed_159.x, fragment_unnamed_155, mad(fragment_unnamed_141.x, fragment_unnamed_137, mad(fragment_unnamed_111.x, fragment_unnamed_107, mad(fragment_unnamed_58.x, fragment_unnamed_53, fragment_unnamed_95)))) * 0.20000000298023223876953125f;
precise float fragment_unnamed_171 = mad(fragment_unnamed_159.y, fragment_unnamed_155, mad(fragment_unnamed_141.y, fragment_unnamed_137, mad(fragment_unnamed_111.y, fragment_unnamed_107, mad(fragment_unnamed_58.y, fragment_unnamed_53, fragment_unnamed_96)))) * 0.20000000298023223876953125f;
precise float fragment_unnamed_172 = mad(fragment_unnamed_159.z, fragment_unnamed_155, mad(fragment_unnamed_141.z, fragment_unnamed_137, mad(fragment_unnamed_111.z, fragment_unnamed_107, mad(fragment_unnamed_58.z, fragment_unnamed_53, fragment_unnamed_97)))) * 0.20000000298023223876953125f;
fragment_output_1.x = fragment_unnamed_170;
fragment_output_1.y = fragment_unnamed_171;
fragment_output_1.z = fragment_unnamed_172;
fragment_output_1.w = 0.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[106] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
stage_output.fragment_output_1 = fragment_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#endif // _HIGH_QUALITY_SAMPLING
ENDHLSL
}
Pass
{
Name "Gaussian Depth Of Field Blur Horizontal"
LOD 100
Tags { "RenderPipeline" = "UniversalPipeline" }
ZTest Always
ZWrite Off
Cull Off
GpuProgramID 187287
HLSLPROGRAM
// https://docs.unity3d.com/Manual/SL-PragmaDirectives.html
#pragma vertex vert
#pragma fragment frag
#pragma target 4.0
#pragma multi_compile _ STEREO_INSTANCING_ON
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[132];
static float4 gl_Position;
static int gl_VertexIndex;
static int gl_BaseVertexARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
};
void vert_main()
{
float vertex_unnamed_32 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_33 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_32, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_33, 2.0f, -1.0f);
precise float vertex_unnamed_43 = (-0.0f) - vertex_unnamed_33;
precise float vertex_unnamed_45 = vertex_unnamed_43 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_32, vertex_uniform_buffer_0[131u].x, vertex_uniform_buffer_0[131u].z);
vertex_output_1.y = mad(vertex_unnamed_45, vertex_uniform_buffer_0[131u].y, vertex_uniform_buffer_0[131u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[131] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[101];
static float4 gl_Position;
static uint gl_Layer;
static int gl_VertexIndex;
static int gl_InstanceIndex;
static int gl_BaseVertexARB;
static int gl_BaseInstanceARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_InstanceIndex : SV_InstanceID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
uint gl_BaseInstanceARB : SV_StartInstanceLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
uint gl_Layer : SV_RenderTargetArrayIndex;
};
void vert_main()
{
float vertex_unnamed_35 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_36 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_35, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_36, 2.0f, -1.0f);
precise float vertex_unnamed_46 = (-0.0f) - vertex_unnamed_36;
precise float vertex_unnamed_48 = vertex_unnamed_46 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_35, vertex_uniform_buffer_0[100u].x, vertex_uniform_buffer_0[100u].z);
vertex_output_1.y = mad(vertex_unnamed_48, vertex_uniform_buffer_0[100u].y, vertex_uniform_buffer_0[100u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
gl_Layer = int((uint(gl_InstanceIndex) - uint(gl_BaseInstanceARB)) & 1u);
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[100] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_InstanceIndex = int(stage_input.gl_InstanceIndex + stage_input.gl_BaseInstanceARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
gl_BaseInstanceARB = stage_input.gl_BaseInstanceARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.gl_Layer = gl_Layer;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
float4 _DownSampleScaleFactor;
float3 _CoCParams;
static float4 fragment_uniform_buffer_0[140];
Texture2D<float4> _BlitTexture;
Texture2D<float4> _HalfCoCTexture;
SamplerState S0;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_44 = fragment_uniform_buffer_0[137u].x * fragment_uniform_buffer_0[138u].x;
precise float fragment_unnamed_45 = fragment_uniform_buffer_0[137u].y * fragment_uniform_buffer_0[138u].y;
precise float fragment_unnamed_46 = fragment_uniform_buffer_0[137u].z * fragment_uniform_buffer_0[138u].z;
precise float fragment_unnamed_53 = fragment_unnamed_44 * fragment_input_1.x;
precise float fragment_unnamed_54 = fragment_unnamed_45 * fragment_input_1.y;
float4 fragment_unnamed_57 = _HalfCoCTexture.Load(int3(uint2(uint(int(fragment_unnamed_53)), uint(int(fragment_unnamed_54))), 0u));
float fragment_unnamed_60 = fragment_unnamed_57.x;
precise float fragment_unnamed_61 = fragment_unnamed_46 * fragment_unnamed_60;
precise float fragment_unnamed_66 = fragment_unnamed_61 * fragment_uniform_buffer_0[139u].z;
precise float fragment_unnamed_67 = fragment_unnamed_66 * (-1.33333337306976318359375f);
precise float fragment_unnamed_69 = fragment_unnamed_66 * 1.33333337306976318359375f;
precise float fragment_unnamed_78 = fragment_unnamed_67 + fragment_input_1.x;
precise float fragment_unnamed_79 = asfloat(2147483648u) + fragment_input_1.y;
precise float fragment_unnamed_80 = fragment_unnamed_69 + fragment_input_1.x;
precise float fragment_unnamed_81 = asfloat(0u) + fragment_input_1.y;
float4 fragment_unnamed_88 = _HalfCoCTexture.SampleBias(S0, float2(fragment_unnamed_78, fragment_unnamed_79), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_90 = fragment_unnamed_88.x;
precise float fragment_unnamed_91 = (-0.0f) - fragment_unnamed_90;
precise float fragment_unnamed_93 = fragment_unnamed_60 + fragment_unnamed_91;
precise float fragment_unnamed_94 = (-0.0f) - fragment_unnamed_93;
precise float fragment_unnamed_95 = fragment_unnamed_94 + 1.0f;
float fragment_unnamed_99 = clamp(fragment_unnamed_95, 0.0f, 1.0f);
float4 fragment_unnamed_104 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_78, fragment_unnamed_79), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_109 = fragment_unnamed_99 * fragment_unnamed_104.x;
precise float fragment_unnamed_110 = fragment_unnamed_99 * fragment_unnamed_104.y;
precise float fragment_unnamed_111 = fragment_unnamed_99 * fragment_unnamed_104.z;
precise float fragment_unnamed_112 = fragment_unnamed_99 * fragment_unnamed_90;
float4 fragment_unnamed_120 = _HalfCoCTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_122 = fragment_unnamed_120.x;
precise float fragment_unnamed_123 = (-0.0f) - fragment_unnamed_122;
precise float fragment_unnamed_124 = fragment_unnamed_60 + fragment_unnamed_123;
precise float fragment_unnamed_125 = (-0.0f) - fragment_unnamed_124;
precise float fragment_unnamed_126 = fragment_unnamed_125 + 1.0f;
float fragment_unnamed_127 = clamp(fragment_unnamed_126, 0.0f, 1.0f);
float4 fragment_unnamed_135 = _BlitTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_140 = fragment_unnamed_127 * fragment_unnamed_135.x;
precise float fragment_unnamed_141 = fragment_unnamed_127 * fragment_unnamed_135.y;
precise float fragment_unnamed_142 = fragment_unnamed_127 * fragment_unnamed_135.z;
precise float fragment_unnamed_143 = fragment_unnamed_127 * fragment_unnamed_122;
precise float fragment_unnamed_144 = fragment_unnamed_140 * 0.2941176593303680419921875f;
precise float fragment_unnamed_146 = fragment_unnamed_141 * 0.2941176593303680419921875f;
precise float fragment_unnamed_147 = fragment_unnamed_142 * 0.2941176593303680419921875f;
precise float fragment_unnamed_148 = fragment_unnamed_143 * 0.2941176593303680419921875f;
float4 fragment_unnamed_157 = _HalfCoCTexture.SampleBias(S0, float2(fragment_unnamed_80, fragment_unnamed_81), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_159 = fragment_unnamed_157.x;
float4 fragment_unnamed_163 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_80, fragment_unnamed_81), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_168 = (-0.0f) - fragment_unnamed_159;
precise float fragment_unnamed_169 = fragment_unnamed_60 + fragment_unnamed_168;
precise float fragment_unnamed_170 = (-0.0f) - fragment_unnamed_169;
precise float fragment_unnamed_171 = fragment_unnamed_170 + 1.0f;
float fragment_unnamed_172 = clamp(fragment_unnamed_171, 0.0f, 1.0f);
precise float fragment_unnamed_173 = fragment_unnamed_172 * fragment_unnamed_163.x;
precise float fragment_unnamed_174 = fragment_unnamed_172 * fragment_unnamed_163.y;
precise float fragment_unnamed_175 = fragment_unnamed_172 * fragment_unnamed_163.z;
precise float fragment_unnamed_176 = fragment_unnamed_172 * fragment_unnamed_159;
precise float fragment_unnamed_181 = mad(fragment_unnamed_176, 0.3529411852359771728515625f, mad(fragment_unnamed_112, 0.3529411852359771728515625f, fragment_unnamed_148)) + 9.9999997473787516355514526367188e-05f;
precise float fragment_unnamed_183 = mad(fragment_unnamed_173, 0.3529411852359771728515625f, mad(fragment_unnamed_109, 0.3529411852359771728515625f, fragment_unnamed_144)) / fragment_unnamed_181;
precise float fragment_unnamed_184 = mad(fragment_unnamed_174, 0.3529411852359771728515625f, mad(fragment_unnamed_110, 0.3529411852359771728515625f, fragment_unnamed_146)) / fragment_unnamed_181;
precise float fragment_unnamed_185 = mad(fragment_unnamed_175, 0.3529411852359771728515625f, mad(fragment_unnamed_111, 0.3529411852359771728515625f, fragment_unnamed_147)) / fragment_unnamed_181;
fragment_output_0.x = fragment_unnamed_183;
fragment_output_0.y = fragment_unnamed_184;
fragment_output_0.z = fragment_unnamed_185;
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[137] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[138] = float4(_DownSampleScaleFactor[0], _DownSampleScaleFactor[1], _DownSampleScaleFactor[2], _DownSampleScaleFactor[3]);
fragment_uniform_buffer_0[139] = float4(_CoCParams[0], _CoCParams[1], _CoCParams[2], fragment_uniform_buffer_0[139][3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
float4 _DownSampleScaleFactor;
float3 _CoCParams;
static float4 fragment_uniform_buffer_0[109];
Texture2DArray<float4> _BlitTexture;
Texture2DArray<float4> _HalfCoCTexture;
SamplerState S0;
static uint gl_Layer;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_46 = fragment_uniform_buffer_0[106u].x * fragment_uniform_buffer_0[107u].x;
precise float fragment_unnamed_47 = fragment_uniform_buffer_0[106u].y * fragment_uniform_buffer_0[107u].y;
precise float fragment_unnamed_48 = fragment_uniform_buffer_0[106u].z * fragment_uniform_buffer_0[107u].z;
precise float fragment_unnamed_55 = fragment_unnamed_46 * fragment_input_1.x;
precise float fragment_unnamed_56 = fragment_unnamed_47 * fragment_input_1.y;
float4 fragment_unnamed_60 = _HalfCoCTexture.Load(int4(uint3(uint(int(fragment_unnamed_55)), uint(int(fragment_unnamed_56)), uint(gl_Layer)), 0u));
float fragment_unnamed_63 = fragment_unnamed_60.x;
precise float fragment_unnamed_64 = fragment_unnamed_48 * fragment_unnamed_63;
precise float fragment_unnamed_69 = fragment_unnamed_64 * fragment_uniform_buffer_0[108u].z;
precise float fragment_unnamed_70 = fragment_unnamed_69 * (-1.33333337306976318359375f);
precise float fragment_unnamed_72 = fragment_unnamed_69 * 1.33333337306976318359375f;
precise float fragment_unnamed_81 = fragment_unnamed_70 + fragment_input_1.x;
precise float fragment_unnamed_82 = asfloat(2147483648u) + fragment_input_1.y;
precise float fragment_unnamed_87 = fragment_unnamed_72 + fragment_input_1.x;
precise float fragment_unnamed_88 = asfloat(0u) + fragment_input_1.y;
float fragment_unnamed_90 = float(uint(gl_Layer));
float4 fragment_unnamed_97 = _HalfCoCTexture.SampleBias(S0, float3(fragment_unnamed_81, fragment_unnamed_82, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_100 = fragment_unnamed_97.x;
float4 fragment_unnamed_105 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_81, fragment_unnamed_82, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_110 = (-0.0f) - fragment_unnamed_100;
precise float fragment_unnamed_112 = fragment_unnamed_63 + fragment_unnamed_110;
precise float fragment_unnamed_113 = (-0.0f) - fragment_unnamed_112;
precise float fragment_unnamed_114 = fragment_unnamed_113 + 1.0f;
float fragment_unnamed_118 = clamp(fragment_unnamed_114, 0.0f, 1.0f);
precise float fragment_unnamed_119 = fragment_unnamed_118 * fragment_unnamed_105.x;
precise float fragment_unnamed_120 = fragment_unnamed_118 * fragment_unnamed_105.y;
precise float fragment_unnamed_121 = fragment_unnamed_118 * fragment_unnamed_105.z;
precise float fragment_unnamed_122 = fragment_unnamed_118 * fragment_unnamed_100;
float4 fragment_unnamed_130 = _HalfCoCTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_132 = fragment_unnamed_130.x;
float4 fragment_unnamed_136 = _BlitTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_141 = (-0.0f) - fragment_unnamed_132;
precise float fragment_unnamed_142 = fragment_unnamed_63 + fragment_unnamed_141;
precise float fragment_unnamed_143 = (-0.0f) - fragment_unnamed_142;
precise float fragment_unnamed_144 = fragment_unnamed_143 + 1.0f;
float fragment_unnamed_145 = clamp(fragment_unnamed_144, 0.0f, 1.0f);
precise float fragment_unnamed_146 = fragment_unnamed_145 * fragment_unnamed_136.x;
precise float fragment_unnamed_147 = fragment_unnamed_145 * fragment_unnamed_136.y;
precise float fragment_unnamed_148 = fragment_unnamed_145 * fragment_unnamed_136.z;
precise float fragment_unnamed_149 = fragment_unnamed_145 * fragment_unnamed_132;
precise float fragment_unnamed_150 = fragment_unnamed_146 * 0.2941176593303680419921875f;
precise float fragment_unnamed_152 = fragment_unnamed_147 * 0.2941176593303680419921875f;
precise float fragment_unnamed_153 = fragment_unnamed_148 * 0.2941176593303680419921875f;
precise float fragment_unnamed_154 = fragment_unnamed_149 * 0.2941176593303680419921875f;
float4 fragment_unnamed_163 = _HalfCoCTexture.SampleBias(S0, float3(fragment_unnamed_87, fragment_unnamed_88, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
float fragment_unnamed_165 = fragment_unnamed_163.x;
float4 fragment_unnamed_169 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_87, fragment_unnamed_88, fragment_unnamed_90), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_174 = (-0.0f) - fragment_unnamed_165;
precise float fragment_unnamed_175 = fragment_unnamed_63 + fragment_unnamed_174;
precise float fragment_unnamed_176 = (-0.0f) - fragment_unnamed_175;
precise float fragment_unnamed_177 = fragment_unnamed_176 + 1.0f;
float fragment_unnamed_178 = clamp(fragment_unnamed_177, 0.0f, 1.0f);
precise float fragment_unnamed_179 = fragment_unnamed_178 * fragment_unnamed_169.x;
precise float fragment_unnamed_180 = fragment_unnamed_178 * fragment_unnamed_169.y;
precise float fragment_unnamed_181 = fragment_unnamed_178 * fragment_unnamed_169.z;
precise float fragment_unnamed_182 = fragment_unnamed_178 * fragment_unnamed_165;
precise float fragment_unnamed_187 = mad(fragment_unnamed_182, 0.3529411852359771728515625f, mad(fragment_unnamed_122, 0.3529411852359771728515625f, fragment_unnamed_154)) + 9.9999997473787516355514526367188e-05f;
precise float fragment_unnamed_189 = mad(fragment_unnamed_179, 0.3529411852359771728515625f, mad(fragment_unnamed_119, 0.3529411852359771728515625f, fragment_unnamed_150)) / fragment_unnamed_187;
precise float fragment_unnamed_190 = mad(fragment_unnamed_180, 0.3529411852359771728515625f, mad(fragment_unnamed_120, 0.3529411852359771728515625f, fragment_unnamed_152)) / fragment_unnamed_187;
precise float fragment_unnamed_191 = mad(fragment_unnamed_181, 0.3529411852359771728515625f, mad(fragment_unnamed_121, 0.3529411852359771728515625f, fragment_unnamed_153)) / fragment_unnamed_187;
fragment_output_0.x = fragment_unnamed_189;
fragment_output_0.y = fragment_unnamed_190;
fragment_output_0.z = fragment_unnamed_191;
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[106] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[107] = float4(_DownSampleScaleFactor[0], _DownSampleScaleFactor[1], _DownSampleScaleFactor[2], _DownSampleScaleFactor[3]);
fragment_uniform_buffer_0[108] = float4(_CoCParams[0], _CoCParams[1], _CoCParams[2], fragment_uniform_buffer_0[108][3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
ENDHLSL
}
Pass
{
Name "Gaussian Depth Of Field Blur Vertical"
LOD 100
Tags { "RenderPipeline" = "UniversalPipeline" }
ZTest Always
ZWrite Off
Cull Off
GpuProgramID 199898
HLSLPROGRAM
// https://docs.unity3d.com/Manual/SL-PragmaDirectives.html
#pragma vertex vert
#pragma fragment frag
#pragma target 4.0
#pragma multi_compile _ STEREO_INSTANCING_ON
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[132];
static float4 gl_Position;
static int gl_VertexIndex;
static int gl_BaseVertexARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
};
void vert_main()
{
float vertex_unnamed_32 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_33 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_32, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_33, 2.0f, -1.0f);
precise float vertex_unnamed_43 = (-0.0f) - vertex_unnamed_33;
precise float vertex_unnamed_45 = vertex_unnamed_43 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_32, vertex_uniform_buffer_0[131u].x, vertex_uniform_buffer_0[131u].z);
vertex_output_1.y = mad(vertex_unnamed_45, vertex_uniform_buffer_0[131u].y, vertex_uniform_buffer_0[131u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[131] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[101];
static float4 gl_Position;
static uint gl_Layer;
static int gl_VertexIndex;
static int gl_InstanceIndex;
static int gl_BaseVertexARB;
static int gl_BaseInstanceARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_InstanceIndex : SV_InstanceID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
uint gl_BaseInstanceARB : SV_StartInstanceLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
uint gl_Layer : SV_RenderTargetArrayIndex;
};
void vert_main()
{
float vertex_unnamed_35 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_36 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_35, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_36, 2.0f, -1.0f);
precise float vertex_unnamed_46 = (-0.0f) - vertex_unnamed_36;
precise float vertex_unnamed_48 = vertex_unnamed_46 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_35, vertex_uniform_buffer_0[100u].x, vertex_uniform_buffer_0[100u].z);
vertex_output_1.y = mad(vertex_unnamed_48, vertex_uniform_buffer_0[100u].y, vertex_uniform_buffer_0[100u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
gl_Layer = int((uint(gl_InstanceIndex) - uint(gl_BaseInstanceARB)) & 1u);
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[100] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_InstanceIndex = int(stage_input.gl_InstanceIndex + stage_input.gl_BaseInstanceARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
gl_BaseInstanceARB = stage_input.gl_BaseInstanceARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.gl_Layer = gl_Layer;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
float4 _DownSampleScaleFactor;
float3 _CoCParams;
static float4 fragment_uniform_buffer_0[140];
Texture2D<float4> _BlitTexture;
Texture2D<float4> _HalfCoCTexture;
SamplerState S0;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_44 = fragment_uniform_buffer_0[137u].x * fragment_uniform_buffer_0[138u].x;
precise float fragment_unnamed_45 = fragment_uniform_buffer_0[137u].y * fragment_uniform_buffer_0[138u].y;
precise float fragment_unnamed_46 = fragment_uniform_buffer_0[137u].w * fragment_uniform_buffer_0[138u].w;
precise float fragment_unnamed_53 = fragment_unnamed_44 * fragment_input_1.x;
precise float fragment_unnamed_54 = fragment_unnamed_45 * fragment_input_1.y;
float4 fragment_unnamed_57 = _HalfCoCTexture.Load(int3(uint2(uint(int(fragment_unnamed_53)), uint(int(fragment_unnamed_54))), 0u));
float fragment_unnamed_60 = fragment_unnamed_57.x;
precise float fragment_unnamed_61 = fragment_unnamed_46 * fragment_unnamed_60;
precise float fragment_unnamed_66 = fragment_unnamed_61 * fragment_uniform_buffer_0[139u].z;
float fragment_unnamed_67 = asfloat(0u);
float fragment_unnamed_73 = mad(-1.33333337306976318359375f, fragment_unnamed_67, fragment_input_1.x);
float fragment_unnamed_75 = mad(-1.33333337306976318359375f, fragment_unnamed_66, fragment_input_1.y);
float fragment_unnamed_76 = mad(1.33333337306976318359375f, fragment_unnamed_67, fragment_input_1.x);
float fragment_unnamed_78 = mad(1.33333337306976318359375f, fragment_unnamed_66, fragment_input_1.y);
precise float fragment_unnamed_88 = (-0.0f) - _HalfCoCTexture.SampleBias(S0, float2(fragment_unnamed_73, fragment_unnamed_75), fragment_uniform_buffer_0[4u].x).x;
precise float fragment_unnamed_90 = fragment_unnamed_60 + fragment_unnamed_88;
precise float fragment_unnamed_91 = (-0.0f) - fragment_unnamed_90;
precise float fragment_unnamed_92 = fragment_unnamed_91 + 1.0f;
float fragment_unnamed_95 = clamp(fragment_unnamed_92, 0.0f, 1.0f);
float4 fragment_unnamed_100 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_73, fragment_unnamed_75), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_105 = fragment_unnamed_95 * fragment_unnamed_100.x;
precise float fragment_unnamed_106 = fragment_unnamed_95 * fragment_unnamed_100.y;
precise float fragment_unnamed_107 = fragment_unnamed_95 * fragment_unnamed_100.z;
precise float fragment_unnamed_118 = (-0.0f) - _HalfCoCTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x).x;
precise float fragment_unnamed_119 = fragment_unnamed_60 + fragment_unnamed_118;
precise float fragment_unnamed_120 = (-0.0f) - fragment_unnamed_119;
precise float fragment_unnamed_121 = fragment_unnamed_120 + 1.0f;
float fragment_unnamed_122 = clamp(fragment_unnamed_121, 0.0f, 1.0f);
float4 fragment_unnamed_130 = _BlitTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_135 = fragment_unnamed_122 * fragment_unnamed_130.x;
precise float fragment_unnamed_136 = fragment_unnamed_122 * fragment_unnamed_130.y;
precise float fragment_unnamed_137 = fragment_unnamed_122 * fragment_unnamed_130.z;
precise float fragment_unnamed_138 = fragment_unnamed_135 * 0.2941176593303680419921875f;
precise float fragment_unnamed_140 = fragment_unnamed_136 * 0.2941176593303680419921875f;
precise float fragment_unnamed_141 = fragment_unnamed_137 * 0.2941176593303680419921875f;
precise float fragment_unnamed_142 = fragment_unnamed_122 * 0.2941176593303680419921875f;
float4 fragment_unnamed_157 = _BlitTexture.SampleBias(S0, float2(fragment_unnamed_76, fragment_unnamed_78), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_162 = (-0.0f) - _HalfCoCTexture.SampleBias(S0, float2(fragment_unnamed_76, fragment_unnamed_78), fragment_uniform_buffer_0[4u].x).x;
precise float fragment_unnamed_163 = fragment_unnamed_60 + fragment_unnamed_162;
precise float fragment_unnamed_164 = (-0.0f) - fragment_unnamed_163;
precise float fragment_unnamed_165 = fragment_unnamed_164 + 1.0f;
float fragment_unnamed_166 = clamp(fragment_unnamed_165, 0.0f, 1.0f);
precise float fragment_unnamed_167 = fragment_unnamed_157.x * fragment_unnamed_166;
precise float fragment_unnamed_168 = fragment_unnamed_157.y * fragment_unnamed_166;
precise float fragment_unnamed_169 = fragment_unnamed_157.z * fragment_unnamed_166;
precise float fragment_unnamed_174 = mad(fragment_unnamed_166, 0.3529411852359771728515625f, mad(fragment_unnamed_95, 0.3529411852359771728515625f, fragment_unnamed_142)) + 9.9999997473787516355514526367188e-05f;
precise float fragment_unnamed_176 = mad(fragment_unnamed_167, 0.3529411852359771728515625f, mad(fragment_unnamed_105, 0.3529411852359771728515625f, fragment_unnamed_138)) / fragment_unnamed_174;
precise float fragment_unnamed_177 = mad(fragment_unnamed_168, 0.3529411852359771728515625f, mad(fragment_unnamed_106, 0.3529411852359771728515625f, fragment_unnamed_140)) / fragment_unnamed_174;
precise float fragment_unnamed_178 = mad(fragment_unnamed_169, 0.3529411852359771728515625f, mad(fragment_unnamed_107, 0.3529411852359771728515625f, fragment_unnamed_141)) / fragment_unnamed_174;
fragment_output_0.x = fragment_unnamed_176;
fragment_output_0.y = fragment_unnamed_177;
fragment_output_0.z = fragment_unnamed_178;
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[137] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[138] = float4(_DownSampleScaleFactor[0], _DownSampleScaleFactor[1], _DownSampleScaleFactor[2], _DownSampleScaleFactor[3]);
fragment_uniform_buffer_0[139] = float4(_CoCParams[0], _CoCParams[1], _CoCParams[2], fragment_uniform_buffer_0[139][3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
float4 _DownSampleScaleFactor;
float3 _CoCParams;
static float4 fragment_uniform_buffer_0[109];
Texture2DArray<float4> _BlitTexture;
Texture2DArray<float4> _HalfCoCTexture;
SamplerState S0;
static uint gl_Layer;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_46 = fragment_uniform_buffer_0[106u].x * fragment_uniform_buffer_0[107u].x;
precise float fragment_unnamed_47 = fragment_uniform_buffer_0[106u].y * fragment_uniform_buffer_0[107u].y;
precise float fragment_unnamed_48 = fragment_uniform_buffer_0[106u].w * fragment_uniform_buffer_0[107u].w;
precise float fragment_unnamed_55 = fragment_unnamed_46 * fragment_input_1.x;
precise float fragment_unnamed_56 = fragment_unnamed_47 * fragment_input_1.y;
float4 fragment_unnamed_60 = _HalfCoCTexture.Load(int4(uint3(uint(int(fragment_unnamed_55)), uint(int(fragment_unnamed_56)), uint(gl_Layer)), 0u));
float fragment_unnamed_63 = fragment_unnamed_60.x;
precise float fragment_unnamed_64 = fragment_unnamed_48 * fragment_unnamed_63;
precise float fragment_unnamed_69 = fragment_unnamed_64 * fragment_uniform_buffer_0[108u].z;
float fragment_unnamed_70 = asfloat(0u);
float fragment_unnamed_76 = mad(-1.33333337306976318359375f, fragment_unnamed_70, fragment_input_1.x);
float fragment_unnamed_78 = mad(-1.33333337306976318359375f, fragment_unnamed_69, fragment_input_1.y);
float fragment_unnamed_83 = mad(1.33333337306976318359375f, fragment_unnamed_70, fragment_input_1.x);
float fragment_unnamed_85 = mad(1.33333337306976318359375f, fragment_unnamed_69, fragment_input_1.y);
float fragment_unnamed_87 = float(uint(gl_Layer));
float4 fragment_unnamed_102 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_76, fragment_unnamed_78, fragment_unnamed_87), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_107 = (-0.0f) - _HalfCoCTexture.SampleBias(S0, float3(fragment_unnamed_76, fragment_unnamed_78, fragment_unnamed_87), fragment_uniform_buffer_0[4u].x).x;
precise float fragment_unnamed_109 = fragment_unnamed_63 + fragment_unnamed_107;
precise float fragment_unnamed_110 = (-0.0f) - fragment_unnamed_109;
precise float fragment_unnamed_111 = fragment_unnamed_110 + 1.0f;
float fragment_unnamed_114 = clamp(fragment_unnamed_111, 0.0f, 1.0f);
precise float fragment_unnamed_115 = fragment_unnamed_114 * fragment_unnamed_102.x;
precise float fragment_unnamed_116 = fragment_unnamed_114 * fragment_unnamed_102.y;
precise float fragment_unnamed_117 = fragment_unnamed_114 * fragment_unnamed_102.z;
float4 fragment_unnamed_131 = _BlitTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_87), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_136 = (-0.0f) - _HalfCoCTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, fragment_unnamed_87), fragment_uniform_buffer_0[4u].x).x;
precise float fragment_unnamed_137 = fragment_unnamed_63 + fragment_unnamed_136;
precise float fragment_unnamed_138 = (-0.0f) - fragment_unnamed_137;
precise float fragment_unnamed_139 = fragment_unnamed_138 + 1.0f;
float fragment_unnamed_140 = clamp(fragment_unnamed_139, 0.0f, 1.0f);
precise float fragment_unnamed_141 = fragment_unnamed_140 * fragment_unnamed_131.x;
precise float fragment_unnamed_142 = fragment_unnamed_140 * fragment_unnamed_131.y;
precise float fragment_unnamed_143 = fragment_unnamed_140 * fragment_unnamed_131.z;
precise float fragment_unnamed_144 = fragment_unnamed_141 * 0.2941176593303680419921875f;
precise float fragment_unnamed_146 = fragment_unnamed_142 * 0.2941176593303680419921875f;
precise float fragment_unnamed_147 = fragment_unnamed_143 * 0.2941176593303680419921875f;
precise float fragment_unnamed_148 = fragment_unnamed_140 * 0.2941176593303680419921875f;
float4 fragment_unnamed_163 = _BlitTexture.SampleBias(S0, float3(fragment_unnamed_83, fragment_unnamed_85, fragment_unnamed_87), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_168 = (-0.0f) - _HalfCoCTexture.SampleBias(S0, float3(fragment_unnamed_83, fragment_unnamed_85, fragment_unnamed_87), fragment_uniform_buffer_0[4u].x).x;
precise float fragment_unnamed_169 = fragment_unnamed_63 + fragment_unnamed_168;
precise float fragment_unnamed_170 = (-0.0f) - fragment_unnamed_169;
precise float fragment_unnamed_171 = fragment_unnamed_170 + 1.0f;
float fragment_unnamed_172 = clamp(fragment_unnamed_171, 0.0f, 1.0f);
precise float fragment_unnamed_173 = fragment_unnamed_163.x * fragment_unnamed_172;
precise float fragment_unnamed_174 = fragment_unnamed_163.y * fragment_unnamed_172;
precise float fragment_unnamed_175 = fragment_unnamed_163.z * fragment_unnamed_172;
precise float fragment_unnamed_180 = mad(fragment_unnamed_172, 0.3529411852359771728515625f, mad(fragment_unnamed_114, 0.3529411852359771728515625f, fragment_unnamed_148)) + 9.9999997473787516355514526367188e-05f;
precise float fragment_unnamed_182 = mad(fragment_unnamed_173, 0.3529411852359771728515625f, mad(fragment_unnamed_115, 0.3529411852359771728515625f, fragment_unnamed_144)) / fragment_unnamed_180;
precise float fragment_unnamed_183 = mad(fragment_unnamed_174, 0.3529411852359771728515625f, mad(fragment_unnamed_116, 0.3529411852359771728515625f, fragment_unnamed_146)) / fragment_unnamed_180;
precise float fragment_unnamed_184 = mad(fragment_unnamed_175, 0.3529411852359771728515625f, mad(fragment_unnamed_117, 0.3529411852359771728515625f, fragment_unnamed_147)) / fragment_unnamed_180;
fragment_output_0.x = fragment_unnamed_182;
fragment_output_0.y = fragment_unnamed_183;
fragment_output_0.z = fragment_unnamed_184;
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[106] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[107] = float4(_DownSampleScaleFactor[0], _DownSampleScaleFactor[1], _DownSampleScaleFactor[2], _DownSampleScaleFactor[3]);
fragment_uniform_buffer_0[108] = float4(_CoCParams[0], _CoCParams[1], _CoCParams[2], fragment_uniform_buffer_0[108][3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
ENDHLSL
}
Pass
{
Name "Gaussian Depth Of Field Composite"
LOD 100
Tags { "RenderPipeline" = "UniversalPipeline" }
ZTest Always
ZWrite Off
Cull Off
GpuProgramID 319719
HLSLPROGRAM
// https://docs.unity3d.com/Manual/SL-PragmaDirectives.html
#pragma vertex vert
#pragma fragment frag
#pragma target 4.0
#pragma multi_compile _ STEREO_INSTANCING_ON
#pragma multi_compile _ _HIGH_QUALITY_SAMPLING
#ifndef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[132];
static float4 gl_Position;
static int gl_VertexIndex;
static int gl_BaseVertexARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
};
void vert_main()
{
float vertex_unnamed_32 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_33 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_32, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_33, 2.0f, -1.0f);
precise float vertex_unnamed_43 = (-0.0f) - vertex_unnamed_33;
precise float vertex_unnamed_45 = vertex_unnamed_43 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_32, vertex_uniform_buffer_0[131u].x, vertex_uniform_buffer_0[131u].z);
vertex_output_1.y = mad(vertex_unnamed_45, vertex_uniform_buffer_0[131u].y, vertex_uniform_buffer_0[131u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[131] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifdef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float4 _BlitScaleBias;
static float4 vertex_uniform_buffer_0[101];
static float4 gl_Position;
static uint gl_Layer;
static int gl_VertexIndex;
static int gl_InstanceIndex;
static int gl_BaseVertexARB;
static int gl_BaseInstanceARB;
static float2 vertex_output_1;
struct Vertex_Stage_Input
{
uint gl_VertexIndex : SV_VertexID;
uint gl_InstanceIndex : SV_InstanceID;
uint gl_BaseVertexARB : SV_StartVertexLocation;
uint gl_BaseInstanceARB : SV_StartInstanceLocation;
};
struct Vertex_Stage_Output
{
float2 vertex_output_1 : TEXCOORD; // TEXCOORD
float4 gl_Position : SV_Position;
uint gl_Layer : SV_RenderTargetArrayIndex;
};
void vert_main()
{
float vertex_unnamed_35 = float(((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) << 1u) & 2u);
float vertex_unnamed_36 = float((uint(gl_VertexIndex) - uint(gl_BaseVertexARB)) & 2u);
gl_Position.x = mad(vertex_unnamed_35, 2.0f, -1.0f);
gl_Position.y = mad(vertex_unnamed_36, 2.0f, -1.0f);
precise float vertex_unnamed_46 = (-0.0f) - vertex_unnamed_36;
precise float vertex_unnamed_48 = vertex_unnamed_46 + 1.0f;
vertex_output_1.x = mad(vertex_unnamed_35, vertex_uniform_buffer_0[100u].x, vertex_uniform_buffer_0[100u].z);
vertex_output_1.y = mad(vertex_unnamed_48, vertex_uniform_buffer_0[100u].y, vertex_uniform_buffer_0[100u].w);
gl_Position.z = 1.0f;
gl_Position.w = 1.0f;
gl_Layer = int((uint(gl_InstanceIndex) - uint(gl_BaseInstanceARB)) & 1u);
}
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
{
vertex_uniform_buffer_0[100] = float4(_BlitScaleBias[0], _BlitScaleBias[1], _BlitScaleBias[2], _BlitScaleBias[3]);
gl_VertexIndex = int(stage_input.gl_VertexIndex + stage_input.gl_BaseVertexARB);
gl_InstanceIndex = int(stage_input.gl_InstanceIndex + stage_input.gl_BaseInstanceARB);
gl_BaseVertexARB = stage_input.gl_BaseVertexARB;
gl_BaseInstanceARB = stage_input.gl_BaseInstanceARB;
vert_main();
Vertex_Stage_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.gl_Layer = gl_Layer;
stage_output.vertex_output_1 = vertex_output_1;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifndef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float2 _GlobalMipBias;
float4 _SourceSize;
static float4 fragment_uniform_buffer_0[138];
Texture2D<float4> _BlitTexture;
Texture2D<float4> _ColorTexture;
Texture2D<float4> _FullCoCTexture;
SamplerState S0;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_45 = fragment_input_1.x * fragment_uniform_buffer_0[137u].x;
precise float fragment_unnamed_46 = fragment_input_1.y * fragment_uniform_buffer_0[137u].y;
uint fragment_unnamed_47 = uint(int(fragment_unnamed_45));
uint fragment_unnamed_48 = uint(int(fragment_unnamed_46));
float4 fragment_unnamed_49 = _BlitTexture.Load(int3(uint2(fragment_unnamed_47, fragment_unnamed_48), 0u));
float4 fragment_unnamed_55 = _FullCoCTexture.Load(int3(uint2(fragment_unnamed_47, fragment_unnamed_48), 0u));
float fragment_unnamed_57 = fragment_unnamed_55.x;
uint fragment_unnamed_94;
float fragment_unnamed_95;
float fragment_unnamed_96;
float fragment_unnamed_97;
if (0.0f < fragment_unnamed_57)
{
float4 fragment_unnamed_71 = _ColorTexture.SampleBias(S0, float2(fragment_input_1.x, fragment_input_1.y), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_76 = fragment_unnamed_57 * 6.283185482025146484375f;
float fragment_unnamed_79 = sqrt(fragment_unnamed_76);
float fragment_unnamed_80 = min(fragment_unnamed_79, 1.0f);
precise float fragment_unnamed_82 = fragment_unnamed_80 * fragment_unnamed_71.x;
precise float fragment_unnamed_83 = fragment_unnamed_80 * fragment_unnamed_71.y;
precise float fragment_unnamed_84 = fragment_unnamed_80 * fragment_unnamed_71.z;
precise float fragment_unnamed_86 = (-0.0f) - fragment_unnamed_79;
precise float fragment_unnamed_88 = fragment_unnamed_86 + 1.0f;
fragment_unnamed_94 = asuint(fragment_unnamed_84);
fragment_unnamed_95 = fragment_unnamed_83;
fragment_unnamed_96 = fragment_unnamed_82;
fragment_unnamed_97 = max(fragment_unnamed_88, 0.0f);
}
else
{
fragment_unnamed_94 = 0u;
fragment_unnamed_95 = asfloat(0u);
fragment_unnamed_96 = asfloat(0u);
fragment_unnamed_97 = asfloat(1065353216u);
}
fragment_output_0.x = mad(fragment_unnamed_49.x, fragment_unnamed_97, fragment_unnamed_96);
fragment_output_0.y = mad(fragment_unnamed_49.y, fragment_unnamed_97, fragment_unnamed_95);
fragment_output_0.z = mad(fragment_unnamed_49.z, fragment_unnamed_97, asfloat(fragment_unnamed_94));
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[4] = float4(_GlobalMipBias[0], _GlobalMipBias[1], fragment_uniform_buffer_0[4][2], fragment_uniform_buffer_0[4][3]);
fragment_uniform_buffer_0[137] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // !STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifdef STEREO_INSTANCING_ON
#ifndef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float2 _GlobalMipBias;
float4 _SourceSize;
static float4 fragment_uniform_buffer_0[107];
Texture2DArray<float4> _BlitTexture;
Texture2DArray<float4> _ColorTexture;
Texture2DArray<float4> _FullCoCTexture;
SamplerState S0;
static uint gl_Layer;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_47 = fragment_input_1.x * fragment_uniform_buffer_0[106u].x;
precise float fragment_unnamed_48 = fragment_input_1.y * fragment_uniform_buffer_0[106u].y;
uint fragment_unnamed_49 = uint(int(fragment_unnamed_47));
uint fragment_unnamed_50 = uint(int(fragment_unnamed_48));
float4 fragment_unnamed_52 = _BlitTexture.Load(int4(uint3(fragment_unnamed_49, fragment_unnamed_50, uint(gl_Layer)), 0u));
float4 fragment_unnamed_58 = _FullCoCTexture.Load(int4(uint3(fragment_unnamed_49, fragment_unnamed_50, uint(gl_Layer)), 0u));
float fragment_unnamed_60 = fragment_unnamed_58.x;
uint fragment_unnamed_100;
uint fragment_unnamed_101;
float fragment_unnamed_102;
float fragment_unnamed_103;
if (0.0f < fragment_unnamed_60)
{
float4 fragment_unnamed_76 = _ColorTexture.SampleBias(S0, float3(fragment_input_1.x, fragment_input_1.y, float(uint(gl_Layer))), fragment_uniform_buffer_0[4u].x);
precise float fragment_unnamed_82 = fragment_unnamed_60 * 6.283185482025146484375f;
float fragment_unnamed_85 = sqrt(fragment_unnamed_82);
float fragment_unnamed_86 = min(fragment_unnamed_85, 1.0f);
precise float fragment_unnamed_88 = fragment_unnamed_86 * fragment_unnamed_76.x;
precise float fragment_unnamed_89 = fragment_unnamed_86 * fragment_unnamed_76.y;
precise float fragment_unnamed_91 = fragment_unnamed_86 * fragment_unnamed_76.z;
precise float fragment_unnamed_93 = (-0.0f) - fragment_unnamed_85;
precise float fragment_unnamed_95 = fragment_unnamed_93 + 1.0f;
fragment_unnamed_100 = asuint(fragment_unnamed_91);
fragment_unnamed_101 = asuint(fragment_unnamed_89);
fragment_unnamed_102 = fragment_unnamed_88;
fragment_unnamed_103 = max(fragment_unnamed_95, 0.0f);
}
else
{
fragment_unnamed_100 = 0u;
fragment_unnamed_101 = 0u;
fragment_unnamed_102 = asfloat(0u);
fragment_unnamed_103 = asfloat(1065353216u);
}
fragment_output_0.x = mad(fragment_unnamed_52.x, fragment_unnamed_103, fragment_unnamed_102);
fragment_output_0.y = mad(fragment_unnamed_52.y, fragment_unnamed_103, asfloat(fragment_unnamed_101));
fragment_output_0.z = mad(fragment_unnamed_52.z, fragment_unnamed_103, asfloat(fragment_unnamed_100));
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[4] = float4(_GlobalMipBias[0], _GlobalMipBias[1], fragment_uniform_buffer_0[4][2], fragment_uniform_buffer_0[4][3]);
fragment_uniform_buffer_0[106] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#endif // !_HIGH_QUALITY_SAMPLING
#ifdef _HIGH_QUALITY_SAMPLING
#ifndef STEREO_INSTANCING_ON
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
float4 _DownSampleScaleFactor;
static float4 fragment_uniform_buffer_0[139];
Texture2D<float4> _BlitTexture;
Texture2D<float4> _ColorTexture;
Texture2D<float4> _FullCoCTexture;
SamplerState S0;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_45 = fragment_input_1.x * fragment_uniform_buffer_0[137u].x;
precise float fragment_unnamed_46 = fragment_input_1.y * fragment_uniform_buffer_0[137u].y;
uint fragment_unnamed_47 = uint(int(fragment_unnamed_45));
uint fragment_unnamed_48 = uint(int(fragment_unnamed_46));
float4 fragment_unnamed_49 = _BlitTexture.Load(int3(uint2(fragment_unnamed_47, fragment_unnamed_48), 0u));
float4 fragment_unnamed_55 = _FullCoCTexture.Load(int3(uint2(fragment_unnamed_47, fragment_unnamed_48), 0u));
float fragment_unnamed_57 = fragment_unnamed_55.x;
float fragment_unnamed_227;
float fragment_unnamed_228;
float fragment_unnamed_229;
float fragment_unnamed_230;
if (0.0f < fragment_unnamed_57)
{
precise float fragment_unnamed_74 = fragment_uniform_buffer_0[137u].x * fragment_uniform_buffer_0[138u].x;
precise float fragment_unnamed_75 = fragment_uniform_buffer_0[137u].y * fragment_uniform_buffer_0[138u].y;
precise float fragment_unnamed_76 = fragment_uniform_buffer_0[137u].z * fragment_uniform_buffer_0[138u].z;
precise float fragment_unnamed_77 = fragment_uniform_buffer_0[137u].w * fragment_uniform_buffer_0[138u].w;
float fragment_unnamed_83 = mad(fragment_input_1.x, fragment_unnamed_74, 0.5f);
float fragment_unnamed_85 = mad(fragment_input_1.y, fragment_unnamed_75, 0.5f);
float fragment_unnamed_86 = floor(fragment_unnamed_83);
float fragment_unnamed_87 = floor(fragment_unnamed_85);
float fragment_unnamed_88 = frac(fragment_unnamed_83);
float fragment_unnamed_89 = frac(fragment_unnamed_85);
precise float fragment_unnamed_90 = (-0.0f) - fragment_unnamed_88;
precise float fragment_unnamed_92 = (-0.0f) - fragment_unnamed_89;
precise float fragment_unnamed_106 = fragment_unnamed_88 * fragment_unnamed_88;
precise float fragment_unnamed_107 = fragment_unnamed_89 * fragment_unnamed_89;
float fragment_unnamed_108 = mad(fragment_unnamed_106, mad(fragment_unnamed_88, 0.5f, -1.0f), 0.666666686534881591796875f);
float fragment_unnamed_110 = mad(fragment_unnamed_107, mad(fragment_unnamed_89, 0.5f, -1.0f), 0.666666686534881591796875f);
float fragment_unnamed_111 = mad(fragment_unnamed_88, mad(fragment_unnamed_88, mad(fragment_unnamed_90, 0.5f, 0.5f), 0.5f), 0.16666667163372039794921875f);
float fragment_unnamed_112 = mad(fragment_unnamed_89, mad(fragment_unnamed_89, mad(fragment_unnamed_92, 0.5f, 0.5f), 0.5f), 0.16666667163372039794921875f);
float fragment_unnamed_113 = mad(fragment_unnamed_88, mad(fragment_unnamed_88, mad(fragment_unnamed_90, 0.16666667163372039794921875f, 0.5f), -0.5f), 0.16666667163372039794921875f);
float fragment_unnamed_114 = mad(fragment_unnamed_89, mad(fragment_unnamed_89, mad(fragment_unnamed_92, 0.16666667163372039794921875f, 0.5f), -0.5f), 0.16666667163372039794921875f);
precise float fragment_unnamed_115 = (-0.0f) - fragment_unnamed_108;
precise float fragment_unnamed_116 = (-0.0f) - fragment_unnamed_110;
precise float fragment_unnamed_117 = fragment_unnamed_115 + 1.0f;
precise float fragment_unnamed_119 = fragment_unnamed_116 + 1.0f;
precise float fragment_unnamed_120 = (-0.0f) - fragment_unnamed_111;
precise float fragment_unnamed_121 = (-0.0f) - fragment_unnamed_112;
precise float fragment_unnamed_122 = fragment_unnamed_120 + fragment_unnamed_117;
precise float fragment_unnamed_123 = fragment_unnamed_121 + fragment_unnamed_119;
precise float fragment_unnamed_124 = (-0.0f) - fragment_unnamed_113;
precise float fragment_unnamed_125 = (-0.0f) - fragment_unnamed_114;
precise float fragment_unnamed_126 = fragment_unnamed_124 + fragment_unnamed_122;
precise float fragment_unnamed_127 = fragment_unnamed_125 + fragment_unnamed_123;
precise float fragment_unnamed_128 = fragment_unnamed_108 + fragment_unnamed_113;
precise float fragment_unnamed_129 = fragment_unnamed_110 + fragment_unnamed_114;
precise float fragment_unnamed_130 = fragment_unnamed_126 + fragment_unnamed_111;
precise float fragment_unnamed_131 = fragment_unnamed_127 + fragment_unnamed_112;
precise float fragment_unnamed_132 = 1.0f / fragment_unnamed_128;
precise float fragment_unnamed_133 = 1.0f / fragment_unnamed_129;
float fragment_unnamed_134 = mad(fragment_unnamed_108, fragment_unnamed_132, -1.0f);
float fragment_unnamed_135 = mad(fragment_unnamed_110, fragment_unnamed_133, -1.0f);
precise float fragment_unnamed_136 = 1.0f / fragment_unnamed_130;
precise float fragment_unnamed_137 = 1.0f / fragment_unnamed_131;
float fragment_unnamed_138 = mad(fragment_unnamed_126, fragment_unnamed_136, 1.0f);
float fragment_unnamed_139 = mad(fragment_unnamed_127, fragment_unnamed_137, 1.0f);
precise float fragment_unnamed_140 = fragment_unnamed_86 + fragment_unnamed_134;
precise float fragment_unnamed_141 = fragment_unnamed_87 + fragment_unnamed_135;
precise float fragment_unnamed_142 = fragment_unnamed_86 + fragment_unnamed_138;
precise float fragment_unnamed_143 = fragment_unnamed_87 + fragment_unnamed_135;
precise float fragment_unnamed_144 = fragment_unnamed_140 + (-0.5f);
precise float fragment_unnamed_145 = fragment_unnamed_141 + (-0.5f);
precise float fragment_unnamed_146 = fragment_unnamed_142 + (-0.5f);
precise float fragment_unnamed_147 = fragment_unnamed_143 + (-0.5f);
precise float fragment_unnamed_148 = fragment_unnamed_76 * fragment_unnamed_144;
precise float fragment_unnamed_149 = fragment_unnamed_77 * fragment_unnamed_145;
precise float fragment_unnamed_150 = fragment_unnamed_76 * fragment_unnamed_146;
precise float fragment_unnamed_151 = fragment_unnamed_77 * fragment_unnamed_147;
float4 fragment_unnamed_158 = _ColorTexture.SampleLevel(S0, float2(min(fragment_unnamed_148, 1.0f), min(fragment_unnamed_149, 1.0f)), 0.0f);
float4 fragment_unnamed_163 = _ColorTexture.SampleLevel(S0, float2(min(fragment_unnamed_150, 1.0f), min(fragment_unnamed_151, 1.0f)), 0.0f);
precise float fragment_unnamed_168 = fragment_unnamed_130 * fragment_unnamed_163.x;
precise float fragment_unnamed_169 = fragment_unnamed_130 * fragment_unnamed_163.y;
precise float fragment_unnamed_170 = fragment_unnamed_130 * fragment_unnamed_163.z;
precise float fragment_unnamed_174 = fragment_unnamed_86 + fragment_unnamed_134;
precise float fragment_unnamed_175 = fragment_unnamed_87 + fragment_unnamed_139;
precise float fragment_unnamed_176 = fragment_unnamed_86 + fragment_unnamed_138;
precise float fragment_unnamed_177 = fragment_unnamed_87 + fragment_unnamed_139;
precise float fragment_unnamed_178 = fragment_unnamed_174 + (-0.5f);
precise float fragment_unnamed_179 = fragment_unnamed_175 + (-0.5f);
precise float fragment_unnamed_180 = fragment_unnamed_176 + (-0.5f);
precise float fragment_unnamed_181 = fragment_unnamed_177 + (-0.5f);
precise float fragment_unnamed_182 = fragment_unnamed_76 * fragment_unnamed_178;
precise float fragment_unnamed_183 = fragment_unnamed_77 * fragment_unnamed_179;
precise float fragment_unnamed_184 = fragment_unnamed_76 * fragment_unnamed_180;
precise float fragment_unnamed_185 = fragment_unnamed_77 * fragment_unnamed_181;
float4 fragment_unnamed_190 = _ColorTexture.SampleLevel(S0, float2(min(fragment_unnamed_182, 1.0f), min(fragment_unnamed_183, 1.0f)), 0.0f);
float4 fragment_unnamed_195 = _ColorTexture.SampleLevel(S0, float2(min(fragment_unnamed_184, 1.0f), min(fragment_unnamed_185, 1.0f)), 0.0f);
precise float fragment_unnamed_200 = fragment_unnamed_195.x * fragment_unnamed_130;
precise float fragment_unnamed_201 = fragment_unnamed_195.y * fragment_unnamed_130;
precise float fragment_unnamed_202 = fragment_unnamed_195.z * fragment_unnamed_130;
precise float fragment_unnamed_206 = mad(fragment_unnamed_128, fragment_unnamed_190.x, fragment_unnamed_200) * fragment_unnamed_131;
precise float fragment_unnamed_207 = mad(fragment_unnamed_128, fragment_unnamed_190.y, fragment_unnamed_201) * fragment_unnamed_131;
precise float fragment_unnamed_208 = mad(fragment_unnamed_128, fragment_unnamed_190.z, fragment_unnamed_202) * fragment_unnamed_131;
precise float fragment_unnamed_212 = fragment_unnamed_57 * 6.283185482025146484375f;
float fragment_unnamed_214 = sqrt(fragment_unnamed_212);
float fragment_unnamed_215 = min(fragment_unnamed_214, 1.0f);
precise float fragment_unnamed_216 = mad(fragment_unnamed_129, mad(fragment_unnamed_128, fragment_unnamed_158.x, fragment_unnamed_168), fragment_unnamed_206) * fragment_unnamed_215;
precise float fragment_unnamed_217 = mad(fragment_unnamed_129, mad(fragment_unnamed_128, fragment_unnamed_158.y, fragment_unnamed_169), fragment_unnamed_207) * fragment_unnamed_215;
precise float fragment_unnamed_218 = mad(fragment_unnamed_129, mad(fragment_unnamed_128, fragment_unnamed_158.z, fragment_unnamed_170), fragment_unnamed_208) * fragment_unnamed_215;
precise float fragment_unnamed_219 = (-0.0f) - fragment_unnamed_214;
precise float fragment_unnamed_220 = fragment_unnamed_219 + 1.0f;
fragment_unnamed_227 = fragment_unnamed_218;
fragment_unnamed_228 = fragment_unnamed_217;
fragment_unnamed_229 = fragment_unnamed_216;
fragment_unnamed_230 = max(fragment_unnamed_220, 0.0f);
}
else
{
fragment_unnamed_227 = asfloat(0u);
fragment_unnamed_228 = asfloat(0u);
fragment_unnamed_229 = asfloat(0u);
fragment_unnamed_230 = asfloat(1065353216u);
}
fragment_output_0.x = mad(fragment_unnamed_49.x, fragment_unnamed_230, fragment_unnamed_229);
fragment_output_0.y = mad(fragment_unnamed_49.y, fragment_unnamed_230, fragment_unnamed_228);
fragment_output_0.z = mad(fragment_unnamed_49.z, fragment_unnamed_230, fragment_unnamed_227);
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[137] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[138] = float4(_DownSampleScaleFactor[0], _DownSampleScaleFactor[1], _DownSampleScaleFactor[2], _DownSampleScaleFactor[3]);
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // _HIGH_QUALITY_SAMPLING
#endif // !STEREO_INSTANCING_ON
#ifdef STEREO_INSTANCING_ON
#ifdef _HIGH_QUALITY_SAMPLING
#define ANY_SHADER_VARIANT_ACTIVE
float4 _SourceSize;
float4 _DownSampleScaleFactor;
static float4 fragment_uniform_buffer_0[108];
Texture2DArray<float4> _BlitTexture;
Texture2DArray<float4> _ColorTexture;
Texture2DArray<float4> _FullCoCTexture;
SamplerState S0;
static uint gl_Layer;
static float2 fragment_input_1;
static float4 fragment_output_0;
struct Fragment_Stage_Input
{
float2 fragment_input_1 : TEXCOORD; // TEXCOORD
uint gl_Layer : SV_RenderTargetArrayIndex;
};
struct Fragment_Stage_Output
{
float4 fragment_output_0 : SV_Target0;
};
void frag_main()
{
precise float fragment_unnamed_47 = fragment_input_1.x * fragment_uniform_buffer_0[106u].x;
precise float fragment_unnamed_48 = fragment_input_1.y * fragment_uniform_buffer_0[106u].y;
uint fragment_unnamed_49 = uint(int(fragment_unnamed_47));
uint fragment_unnamed_50 = uint(int(fragment_unnamed_48));
float4 fragment_unnamed_52 = _BlitTexture.Load(int4(uint3(fragment_unnamed_49, fragment_unnamed_50, uint(gl_Layer)), 0u));
float4 fragment_unnamed_58 = _FullCoCTexture.Load(int4(uint3(fragment_unnamed_49, fragment_unnamed_50, uint(gl_Layer)), 0u));
float fragment_unnamed_60 = fragment_unnamed_58.x;
float fragment_unnamed_233;
float fragment_unnamed_234;
float fragment_unnamed_235;
float fragment_unnamed_236;
if (0.0f < fragment_unnamed_60)
{
precise float fragment_unnamed_77 = fragment_uniform_buffer_0[106u].x * fragment_uniform_buffer_0[107u].x;
precise float fragment_unnamed_78 = fragment_uniform_buffer_0[106u].y * fragment_uniform_buffer_0[107u].y;
precise float fragment_unnamed_79 = fragment_uniform_buffer_0[106u].z * fragment_uniform_buffer_0[107u].z;
precise float fragment_unnamed_80 = fragment_uniform_buffer_0[106u].w * fragment_uniform_buffer_0[107u].w;
float fragment_unnamed_86 = mad(fragment_input_1.x, fragment_unnamed_77, 0.5f);
float fragment_unnamed_88 = mad(fragment_input_1.y, fragment_unnamed_78, 0.5f);
float fragment_unnamed_89 = floor(fragment_unnamed_86);
float fragment_unnamed_90 = floor(fragment_unnamed_88);
float fragment_unnamed_91 = frac(fragment_unnamed_86);
float fragment_unnamed_92 = frac(fragment_unnamed_88);
precise float fragment_unnamed_93 = (-0.0f) - fragment_unnamed_91;
precise float fragment_unnamed_95 = (-0.0f) - fragment_unnamed_92;
precise float fragment_unnamed_109 = fragment_unnamed_91 * fragment_unnamed_91;
precise float fragment_unnamed_110 = fragment_unnamed_92 * fragment_unnamed_92;
float fragment_unnamed_111 = mad(fragment_unnamed_109, mad(fragment_unnamed_91, 0.5f, -1.0f), 0.666666686534881591796875f);
float fragment_unnamed_113 = mad(fragment_unnamed_110, mad(fragment_unnamed_92, 0.5f, -1.0f), 0.666666686534881591796875f);
float fragment_unnamed_114 = mad(fragment_unnamed_91, mad(fragment_unnamed_91, mad(fragment_unnamed_93, 0.5f, 0.5f), 0.5f), 0.16666667163372039794921875f);
float fragment_unnamed_115 = mad(fragment_unnamed_92, mad(fragment_unnamed_92, mad(fragment_unnamed_95, 0.5f, 0.5f), 0.5f), 0.16666667163372039794921875f);
float fragment_unnamed_116 = mad(fragment_unnamed_91, mad(fragment_unnamed_91, mad(fragment_unnamed_93, 0.16666667163372039794921875f, 0.5f), -0.5f), 0.16666667163372039794921875f);
float fragment_unnamed_117 = mad(fragment_unnamed_92, mad(fragment_unnamed_92, mad(fragment_unnamed_95, 0.16666667163372039794921875f, 0.5f), -0.5f), 0.16666667163372039794921875f);
precise float fragment_unnamed_118 = (-0.0f) - fragment_unnamed_111;
precise float fragment_unnamed_119 = (-0.0f) - fragment_unnamed_113;
precise float fragment_unnamed_120 = fragment_unnamed_118 + 1.0f;
precise float fragment_unnamed_122 = fragment_unnamed_119 + 1.0f;
precise float fragment_unnamed_123 = (-0.0f) - fragment_unnamed_114;
precise float fragment_unnamed_124 = (-0.0f) - fragment_unnamed_115;
precise float fragment_unnamed_125 = fragment_unnamed_123 + fragment_unnamed_120;
precise float fragment_unnamed_126 = fragment_unnamed_124 + fragment_unnamed_122;
precise float fragment_unnamed_127 = (-0.0f) - fragment_unnamed_116;
precise float fragment_unnamed_128 = (-0.0f) - fragment_unnamed_117;
precise float fragment_unnamed_129 = fragment_unnamed_127 + fragment_unnamed_125;
precise float fragment_unnamed_130 = fragment_unnamed_128 + fragment_unnamed_126;
precise float fragment_unnamed_131 = fragment_unnamed_111 + fragment_unnamed_116;
precise float fragment_unnamed_132 = fragment_unnamed_113 + fragment_unnamed_117;
precise float fragment_unnamed_133 = fragment_unnamed_129 + fragment_unnamed_114;
precise float fragment_unnamed_134 = fragment_unnamed_130 + fragment_unnamed_115;
precise float fragment_unnamed_135 = 1.0f / fragment_unnamed_131;
precise float fragment_unnamed_136 = 1.0f / fragment_unnamed_132;
float fragment_unnamed_137 = mad(fragment_unnamed_111, fragment_unnamed_135, -1.0f);
float fragment_unnamed_138 = mad(fragment_unnamed_113, fragment_unnamed_136, -1.0f);
precise float fragment_unnamed_139 = 1.0f / fragment_unnamed_133;
precise float fragment_unnamed_140 = 1.0f / fragment_unnamed_134;
float fragment_unnamed_141 = mad(fragment_unnamed_129, fragment_unnamed_139, 1.0f);
float fragment_unnamed_142 = mad(fragment_unnamed_130, fragment_unnamed_140, 1.0f);
precise float fragment_unnamed_143 = fragment_unnamed_89 + fragment_unnamed_137;
precise float fragment_unnamed_144 = fragment_unnamed_90 + fragment_unnamed_138;
precise float fragment_unnamed_145 = fragment_unnamed_89 + fragment_unnamed_141;
precise float fragment_unnamed_146 = fragment_unnamed_90 + fragment_unnamed_138;
precise float fragment_unnamed_147 = fragment_unnamed_143 + (-0.5f);
precise float fragment_unnamed_148 = fragment_unnamed_144 + (-0.5f);
precise float fragment_unnamed_149 = fragment_unnamed_145 + (-0.5f);
precise float fragment_unnamed_150 = fragment_unnamed_146 + (-0.5f);
precise float fragment_unnamed_151 = fragment_unnamed_79 * fragment_unnamed_147;
precise float fragment_unnamed_152 = fragment_unnamed_80 * fragment_unnamed_148;
precise float fragment_unnamed_153 = fragment_unnamed_79 * fragment_unnamed_149;
precise float fragment_unnamed_154 = fragment_unnamed_80 * fragment_unnamed_150;
float fragment_unnamed_158 = float(uint(gl_Layer));
float4 fragment_unnamed_161 = _ColorTexture.SampleLevel(S0, float3(min(fragment_unnamed_151, 1.0f), min(fragment_unnamed_152, 1.0f), fragment_unnamed_158), 0.0f);
float4 fragment_unnamed_169 = _ColorTexture.SampleLevel(S0, float3(min(fragment_unnamed_153, 1.0f), min(fragment_unnamed_154, 1.0f), fragment_unnamed_158), 0.0f);
precise float fragment_unnamed_174 = fragment_unnamed_133 * fragment_unnamed_169.x;
precise float fragment_unnamed_175 = fragment_unnamed_133 * fragment_unnamed_169.y;
precise float fragment_unnamed_176 = fragment_unnamed_133 * fragment_unnamed_169.z;
precise float fragment_unnamed_180 = fragment_unnamed_89 + fragment_unnamed_137;
precise float fragment_unnamed_181 = fragment_unnamed_90 + fragment_unnamed_142;
precise float fragment_unnamed_182 = fragment_unnamed_89 + fragment_unnamed_141;
precise float fragment_unnamed_183 = fragment_unnamed_90 + fragment_unnamed_142;
precise float fragment_unnamed_184 = fragment_unnamed_180 + (-0.5f);
precise float fragment_unnamed_185 = fragment_unnamed_181 + (-0.5f);
precise float fragment_unnamed_186 = fragment_unnamed_182 + (-0.5f);
precise float fragment_unnamed_187 = fragment_unnamed_183 + (-0.5f);
precise float fragment_unnamed_188 = fragment_unnamed_79 * fragment_unnamed_184;
precise float fragment_unnamed_189 = fragment_unnamed_80 * fragment_unnamed_185;
precise float fragment_unnamed_190 = fragment_unnamed_79 * fragment_unnamed_186;
precise float fragment_unnamed_191 = fragment_unnamed_80 * fragment_unnamed_187;
float4 fragment_unnamed_194 = _ColorTexture.SampleLevel(S0, float3(min(fragment_unnamed_188, 1.0f), min(fragment_unnamed_189, 1.0f), fragment_unnamed_158), 0.0f);
float4 fragment_unnamed_201 = _ColorTexture.SampleLevel(S0, float3(min(fragment_unnamed_190, 1.0f), min(fragment_unnamed_191, 1.0f), fragment_unnamed_158), 0.0f);
precise float fragment_unnamed_206 = fragment_unnamed_201.x * fragment_unnamed_133;
precise float fragment_unnamed_207 = fragment_unnamed_201.y * fragment_unnamed_133;
precise float fragment_unnamed_208 = fragment_unnamed_201.z * fragment_unnamed_133;
precise float fragment_unnamed_212 = mad(fragment_unnamed_131, fragment_unnamed_194.x, fragment_unnamed_206) * fragment_unnamed_134;
precise float fragment_unnamed_213 = mad(fragment_unnamed_131, fragment_unnamed_194.y, fragment_unnamed_207) * fragment_unnamed_134;
precise float fragment_unnamed_214 = mad(fragment_unnamed_131, fragment_unnamed_194.z, fragment_unnamed_208) * fragment_unnamed_134;
precise float fragment_unnamed_218 = fragment_unnamed_60 * 6.283185482025146484375f;
float fragment_unnamed_220 = sqrt(fragment_unnamed_218);
float fragment_unnamed_221 = min(fragment_unnamed_220, 1.0f);
precise float fragment_unnamed_222 = mad(fragment_unnamed_132, mad(fragment_unnamed_131, fragment_unnamed_161.x, fragment_unnamed_174), fragment_unnamed_212) * fragment_unnamed_221;
precise float fragment_unnamed_223 = mad(fragment_unnamed_132, mad(fragment_unnamed_131, fragment_unnamed_161.y, fragment_unnamed_175), fragment_unnamed_213) * fragment_unnamed_221;
precise float fragment_unnamed_224 = mad(fragment_unnamed_132, mad(fragment_unnamed_131, fragment_unnamed_161.z, fragment_unnamed_176), fragment_unnamed_214) * fragment_unnamed_221;
precise float fragment_unnamed_225 = (-0.0f) - fragment_unnamed_220;
precise float fragment_unnamed_226 = fragment_unnamed_225 + 1.0f;
fragment_unnamed_233 = fragment_unnamed_224;
fragment_unnamed_234 = fragment_unnamed_223;
fragment_unnamed_235 = fragment_unnamed_222;
fragment_unnamed_236 = max(fragment_unnamed_226, 0.0f);
}
else
{
fragment_unnamed_233 = asfloat(0u);
fragment_unnamed_234 = asfloat(0u);
fragment_unnamed_235 = asfloat(0u);
fragment_unnamed_236 = asfloat(1065353216u);
}
fragment_output_0.x = mad(fragment_unnamed_52.x, fragment_unnamed_236, fragment_unnamed_235);
fragment_output_0.y = mad(fragment_unnamed_52.y, fragment_unnamed_236, fragment_unnamed_234);
fragment_output_0.z = mad(fragment_unnamed_52.z, fragment_unnamed_236, fragment_unnamed_233);
fragment_output_0.w = 1.0f;
}
Fragment_Stage_Output frag(Fragment_Stage_Input stage_input)
{
fragment_uniform_buffer_0[106] = float4(_SourceSize[0], _SourceSize[1], _SourceSize[2], _SourceSize[3]);
fragment_uniform_buffer_0[107] = float4(_DownSampleScaleFactor[0], _DownSampleScaleFactor[1], _DownSampleScaleFactor[2], _DownSampleScaleFactor[3]);
gl_Layer = stage_input.gl_Layer;
fragment_input_1 = stage_input.fragment_input_1;
frag_main();
Fragment_Stage_Output stage_output;
stage_output.fragment_output_0 = fragment_output_0;
return stage_output;
}
#endif // STEREO_INSTANCING_ON
#endif // _HIGH_QUALITY_SAMPLING
ENDHLSL
}
}
}