229 lines
12 KiB
GLSL
229 lines
12 KiB
GLSL
Shader "Hidden/Core/FallbackError"
|
|
{
|
|
Properties
|
|
{
|
|
}
|
|
SubShader
|
|
{
|
|
Pass
|
|
{
|
|
GpuProgramID 49505
|
|
|
|
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
|
|
|
|
float4x4 unity_ObjectToWorld;
|
|
float4x4 unity_MatrixVP;
|
|
|
|
static float4 vertex_uniform_buffer_0[4];
|
|
static float4 vertex_uniform_buffer_1[21];
|
|
static float4 gl_Position;
|
|
static float4 vertex_input_0;
|
|
|
|
struct Vertex_Stage_Input
|
|
{
|
|
float4 vertex_input_0 : POSITION; // POSITION
|
|
};
|
|
|
|
struct Vertex_Stage_Output
|
|
{
|
|
float4 gl_Position : SV_Position;
|
|
};
|
|
|
|
void vert_main()
|
|
{
|
|
precise float vertex_unnamed_34 = vertex_input_0.y * vertex_uniform_buffer_0[1u].x;
|
|
precise float vertex_unnamed_35 = vertex_input_0.y * vertex_uniform_buffer_0[1u].y;
|
|
precise float vertex_unnamed_36 = vertex_input_0.y * vertex_uniform_buffer_0[1u].z;
|
|
precise float vertex_unnamed_37 = vertex_input_0.y * vertex_uniform_buffer_0[1u].w;
|
|
precise float vertex_unnamed_71 = mad(vertex_uniform_buffer_0[2u].x, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].x, vertex_input_0.x, vertex_unnamed_34)) + vertex_uniform_buffer_0[3u].x;
|
|
precise float vertex_unnamed_72 = mad(vertex_uniform_buffer_0[2u].y, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].y, vertex_input_0.x, vertex_unnamed_35)) + vertex_uniform_buffer_0[3u].y;
|
|
precise float vertex_unnamed_73 = mad(vertex_uniform_buffer_0[2u].z, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].z, vertex_input_0.x, vertex_unnamed_36)) + vertex_uniform_buffer_0[3u].z;
|
|
precise float vertex_unnamed_74 = mad(vertex_uniform_buffer_0[2u].w, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].w, vertex_input_0.x, vertex_unnamed_37)) + vertex_uniform_buffer_0[3u].w;
|
|
precise float vertex_unnamed_82 = vertex_unnamed_72 * vertex_uniform_buffer_1[18u].x;
|
|
precise float vertex_unnamed_83 = vertex_unnamed_72 * vertex_uniform_buffer_1[18u].y;
|
|
precise float vertex_unnamed_84 = vertex_unnamed_72 * vertex_uniform_buffer_1[18u].z;
|
|
precise float vertex_unnamed_85 = vertex_unnamed_72 * vertex_uniform_buffer_1[18u].w;
|
|
gl_Position.x = mad(vertex_uniform_buffer_1[20u].x, vertex_unnamed_74, mad(vertex_uniform_buffer_1[19u].x, vertex_unnamed_73, mad(vertex_uniform_buffer_1[17u].x, vertex_unnamed_71, vertex_unnamed_82)));
|
|
gl_Position.y = mad(vertex_uniform_buffer_1[20u].y, vertex_unnamed_74, mad(vertex_uniform_buffer_1[19u].y, vertex_unnamed_73, mad(vertex_uniform_buffer_1[17u].y, vertex_unnamed_71, vertex_unnamed_83)));
|
|
gl_Position.z = mad(vertex_uniform_buffer_1[20u].z, vertex_unnamed_74, mad(vertex_uniform_buffer_1[19u].z, vertex_unnamed_73, mad(vertex_uniform_buffer_1[17u].z, vertex_unnamed_71, vertex_unnamed_84)));
|
|
gl_Position.w = mad(vertex_uniform_buffer_1[20u].w, vertex_unnamed_74, mad(vertex_uniform_buffer_1[19u].w, vertex_unnamed_73, mad(vertex_uniform_buffer_1[17u].w, vertex_unnamed_71, vertex_unnamed_85)));
|
|
}
|
|
|
|
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
|
|
{
|
|
vertex_uniform_buffer_0[0] = float4(unity_ObjectToWorld[0][0], unity_ObjectToWorld[1][0], unity_ObjectToWorld[2][0], unity_ObjectToWorld[3][0]);
|
|
vertex_uniform_buffer_0[1] = float4(unity_ObjectToWorld[0][1], unity_ObjectToWorld[1][1], unity_ObjectToWorld[2][1], unity_ObjectToWorld[3][1]);
|
|
vertex_uniform_buffer_0[2] = float4(unity_ObjectToWorld[0][2], unity_ObjectToWorld[1][2], unity_ObjectToWorld[2][2], unity_ObjectToWorld[3][2]);
|
|
vertex_uniform_buffer_0[3] = float4(unity_ObjectToWorld[0][3], unity_ObjectToWorld[1][3], unity_ObjectToWorld[2][3], unity_ObjectToWorld[3][3]);
|
|
|
|
vertex_uniform_buffer_1[17] = float4(unity_MatrixVP[0][0], unity_MatrixVP[1][0], unity_MatrixVP[2][0], unity_MatrixVP[3][0]);
|
|
vertex_uniform_buffer_1[18] = float4(unity_MatrixVP[0][1], unity_MatrixVP[1][1], unity_MatrixVP[2][1], unity_MatrixVP[3][1]);
|
|
vertex_uniform_buffer_1[19] = float4(unity_MatrixVP[0][2], unity_MatrixVP[1][2], unity_MatrixVP[2][2], unity_MatrixVP[3][2]);
|
|
vertex_uniform_buffer_1[20] = float4(unity_MatrixVP[0][3], unity_MatrixVP[1][3], unity_MatrixVP[2][3], unity_MatrixVP[3][3]);
|
|
|
|
vertex_input_0 = stage_input.vertex_input_0;
|
|
vert_main();
|
|
Vertex_Stage_Output stage_output;
|
|
stage_output.gl_Position = gl_Position;
|
|
return stage_output;
|
|
}
|
|
|
|
#endif // !STEREO_INSTANCING_ON
|
|
|
|
|
|
#ifdef STEREO_INSTANCING_ON
|
|
#define ANY_SHADER_VARIANT_ACTIVE
|
|
|
|
float4x4 unity_ObjectToWorld;
|
|
float4x4 unity_StereoMatrixVP[2];
|
|
|
|
static float4 vertex_uniform_buffer_0[4];
|
|
static float4 vertex_uniform_buffer_1[32];
|
|
static float4 gl_Position;
|
|
static uint gl_Layer;
|
|
static int gl_InstanceIndex;
|
|
static int gl_BaseInstanceARB;
|
|
static float4 vertex_input_0;
|
|
|
|
struct Vertex_Stage_Input
|
|
{
|
|
float4 vertex_input_0 : POSITION; // POSITION
|
|
uint gl_InstanceIndex : SV_InstanceID;
|
|
uint gl_BaseInstanceARB : SV_StartInstanceLocation;
|
|
};
|
|
|
|
struct Vertex_Stage_Output
|
|
{
|
|
float4 gl_Position : SV_Position;
|
|
uint gl_Layer : SV_RenderTargetArrayIndex;
|
|
};
|
|
|
|
void vert_main()
|
|
{
|
|
precise float vertex_unnamed_38 = vertex_input_0.y * vertex_uniform_buffer_0[1u].x;
|
|
precise float vertex_unnamed_39 = vertex_input_0.y * vertex_uniform_buffer_0[1u].y;
|
|
precise float vertex_unnamed_40 = vertex_input_0.y * vertex_uniform_buffer_0[1u].z;
|
|
precise float vertex_unnamed_41 = vertex_input_0.y * vertex_uniform_buffer_0[1u].w;
|
|
precise float vertex_unnamed_75 = mad(vertex_uniform_buffer_0[2u].x, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].x, vertex_input_0.x, vertex_unnamed_38)) + vertex_uniform_buffer_0[3u].x;
|
|
precise float vertex_unnamed_76 = mad(vertex_uniform_buffer_0[2u].y, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].y, vertex_input_0.x, vertex_unnamed_39)) + vertex_uniform_buffer_0[3u].y;
|
|
precise float vertex_unnamed_77 = mad(vertex_uniform_buffer_0[2u].z, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].z, vertex_input_0.x, vertex_unnamed_40)) + vertex_uniform_buffer_0[3u].z;
|
|
precise float vertex_unnamed_78 = mad(vertex_uniform_buffer_0[2u].w, vertex_input_0.z, mad(vertex_uniform_buffer_0[0u].w, vertex_input_0.x, vertex_unnamed_41)) + vertex_uniform_buffer_0[3u].w;
|
|
uint vertex_unnamed_83 = (uint(gl_InstanceIndex) - uint(gl_BaseInstanceARB)) & 1u;
|
|
uint vertex_unnamed_84 = vertex_unnamed_83 << 2u;
|
|
gl_Layer = int(vertex_unnamed_83);
|
|
uint vertex_unnamed_85 = vertex_unnamed_84 + 25u;
|
|
precise float vertex_unnamed_93 = vertex_unnamed_76 * vertex_uniform_buffer_1[vertex_unnamed_85].x;
|
|
precise float vertex_unnamed_94 = vertex_unnamed_76 * vertex_uniform_buffer_1[vertex_unnamed_85].y;
|
|
precise float vertex_unnamed_95 = vertex_unnamed_76 * vertex_uniform_buffer_1[vertex_unnamed_85].z;
|
|
precise float vertex_unnamed_96 = vertex_unnamed_76 * vertex_uniform_buffer_1[vertex_unnamed_85].w;
|
|
uint vertex_unnamed_97 = vertex_unnamed_84 + 24u;
|
|
uint vertex_unnamed_109 = vertex_unnamed_84 + 26u;
|
|
uint vertex_unnamed_121 = vertex_unnamed_84 + 27u;
|
|
gl_Position.x = mad(vertex_uniform_buffer_1[vertex_unnamed_121].x, vertex_unnamed_78, mad(vertex_uniform_buffer_1[vertex_unnamed_109].x, vertex_unnamed_77, mad(vertex_uniform_buffer_1[vertex_unnamed_97].x, vertex_unnamed_75, vertex_unnamed_93)));
|
|
gl_Position.y = mad(vertex_uniform_buffer_1[vertex_unnamed_121].y, vertex_unnamed_78, mad(vertex_uniform_buffer_1[vertex_unnamed_109].y, vertex_unnamed_77, mad(vertex_uniform_buffer_1[vertex_unnamed_97].y, vertex_unnamed_75, vertex_unnamed_94)));
|
|
gl_Position.z = mad(vertex_uniform_buffer_1[vertex_unnamed_121].z, vertex_unnamed_78, mad(vertex_uniform_buffer_1[vertex_unnamed_109].z, vertex_unnamed_77, mad(vertex_uniform_buffer_1[vertex_unnamed_97].z, vertex_unnamed_75, vertex_unnamed_95)));
|
|
gl_Position.w = mad(vertex_uniform_buffer_1[vertex_unnamed_121].w, vertex_unnamed_78, mad(vertex_uniform_buffer_1[vertex_unnamed_109].w, vertex_unnamed_77, mad(vertex_uniform_buffer_1[vertex_unnamed_97].w, vertex_unnamed_75, vertex_unnamed_96)));
|
|
}
|
|
|
|
Vertex_Stage_Output vert(Vertex_Stage_Input stage_input)
|
|
{
|
|
vertex_uniform_buffer_0[0] = float4(unity_ObjectToWorld[0][0], unity_ObjectToWorld[1][0], unity_ObjectToWorld[2][0], unity_ObjectToWorld[3][0]);
|
|
vertex_uniform_buffer_0[1] = float4(unity_ObjectToWorld[0][1], unity_ObjectToWorld[1][1], unity_ObjectToWorld[2][1], unity_ObjectToWorld[3][1]);
|
|
vertex_uniform_buffer_0[2] = float4(unity_ObjectToWorld[0][2], unity_ObjectToWorld[1][2], unity_ObjectToWorld[2][2], unity_ObjectToWorld[3][2]);
|
|
vertex_uniform_buffer_0[3] = float4(unity_ObjectToWorld[0][3], unity_ObjectToWorld[1][3], unity_ObjectToWorld[2][3], unity_ObjectToWorld[3][3]);
|
|
|
|
vertex_uniform_buffer_1[24] = float4(unity_StereoMatrixVP[0][0][0], unity_StereoMatrixVP[0][1][0], unity_StereoMatrixVP[0][2][0], unity_StereoMatrixVP[0][3][0]);
|
|
vertex_uniform_buffer_1[25] = float4(unity_StereoMatrixVP[0][0][1], unity_StereoMatrixVP[0][1][1], unity_StereoMatrixVP[0][2][1], unity_StereoMatrixVP[0][3][1]);
|
|
vertex_uniform_buffer_1[26] = float4(unity_StereoMatrixVP[0][0][2], unity_StereoMatrixVP[0][1][2], unity_StereoMatrixVP[0][2][2], unity_StereoMatrixVP[0][3][2]);
|
|
vertex_uniform_buffer_1[27] = float4(unity_StereoMatrixVP[0][0][3], unity_StereoMatrixVP[0][1][3], unity_StereoMatrixVP[0][2][3], unity_StereoMatrixVP[0][3][3]);
|
|
vertex_uniform_buffer_1[28] = float4(unity_StereoMatrixVP[1][0][0], unity_StereoMatrixVP[1][1][0], unity_StereoMatrixVP[1][2][0], unity_StereoMatrixVP[1][3][0]);
|
|
vertex_uniform_buffer_1[29] = float4(unity_StereoMatrixVP[1][0][1], unity_StereoMatrixVP[1][1][1], unity_StereoMatrixVP[1][2][1], unity_StereoMatrixVP[1][3][1]);
|
|
vertex_uniform_buffer_1[30] = float4(unity_StereoMatrixVP[1][0][2], unity_StereoMatrixVP[1][1][2], unity_StereoMatrixVP[1][2][2], unity_StereoMatrixVP[1][3][2]);
|
|
vertex_uniform_buffer_1[31] = float4(unity_StereoMatrixVP[1][0][3], unity_StereoMatrixVP[1][1][3], unity_StereoMatrixVP[1][2][3], unity_StereoMatrixVP[1][3][3]);
|
|
|
|
gl_InstanceIndex = int(stage_input.gl_InstanceIndex + stage_input.gl_BaseInstanceARB);
|
|
gl_BaseInstanceARB = stage_input.gl_BaseInstanceARB;
|
|
vertex_input_0 = stage_input.vertex_input_0;
|
|
vert_main();
|
|
Vertex_Stage_Output stage_output;
|
|
stage_output.gl_Position = gl_Position;
|
|
stage_output.gl_Layer = gl_Layer;
|
|
return stage_output;
|
|
}
|
|
|
|
#endif // STEREO_INSTANCING_ON
|
|
|
|
|
|
#ifndef STEREO_INSTANCING_ON
|
|
#define ANY_SHADER_VARIANT_ACTIVE
|
|
|
|
static float4 fragment_output_0;
|
|
|
|
struct Fragment_Stage_Output
|
|
{
|
|
float4 fragment_output_0 : SV_Target0;
|
|
};
|
|
|
|
void frag_main()
|
|
{
|
|
fragment_output_0.x = 1.0f;
|
|
fragment_output_0.y = 0.0f;
|
|
fragment_output_0.z = 1.0f;
|
|
fragment_output_0.w = 1.0f;
|
|
}
|
|
|
|
Fragment_Stage_Output frag()
|
|
{
|
|
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
|
|
|
|
static float4 fragment_output_0;
|
|
|
|
struct Fragment_Stage_Output
|
|
{
|
|
float4 fragment_output_0 : SV_Target0;
|
|
};
|
|
|
|
void frag_main()
|
|
{
|
|
fragment_output_0.x = 1.0f;
|
|
fragment_output_0.y = 0.0f;
|
|
fragment_output_0.z = 1.0f;
|
|
fragment_output_0.w = 1.0f;
|
|
}
|
|
|
|
Fragment_Stage_Output frag()
|
|
{
|
|
frag_main();
|
|
Fragment_Stage_Output stage_output;
|
|
stage_output.fragment_output_0 = fragment_output_0;
|
|
return stage_output;
|
|
}
|
|
|
|
#endif // STEREO_INSTANCING_ON
|
|
|
|
|
|
ENDHLSL
|
|
}
|
|
}
|
|
}
|