Shader "Hidden/Universal Render Pipeline/XR/XROcclusionMesh" { Properties { } SubShader { Tags { "RenderPipeline" = "UniversalPipeline" } Pass { Tags { "RenderPipeline" = "UniversalPipeline" } ColorMask 0 Cull Off GpuProgramID 21452 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 _ XR_OCCLUSION_MESH_COMBINED #ifndef STEREO_INSTANCING_ON #ifndef XR_OCCLUSION_MESH_COMBINED #define ANY_SHADER_VARIANT_ACTIVE float4x4 unity_ObjectToWorld; static float4 vertex_uniform_buffer_0[4]; 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() { float vertex_unnamed_25 = mad(vertex_input_0.x, 2.0f, -1.0f); float vertex_unnamed_28 = mad(vertex_input_0.y, -2.0f, 1.0f); precise float vertex_unnamed_38 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].x; precise float vertex_unnamed_39 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].y; precise float vertex_unnamed_40 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].z; precise float vertex_unnamed_41 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].w; precise float vertex_unnamed_59 = mad(vertex_uniform_buffer_0[0u].x, vertex_unnamed_25, vertex_unnamed_38) + vertex_uniform_buffer_0[2u].x; precise float vertex_unnamed_60 = mad(vertex_uniform_buffer_0[0u].y, vertex_unnamed_25, vertex_unnamed_39) + vertex_uniform_buffer_0[2u].y; precise float vertex_unnamed_61 = mad(vertex_uniform_buffer_0[0u].z, vertex_unnamed_25, vertex_unnamed_40) + vertex_uniform_buffer_0[2u].z; precise float vertex_unnamed_62 = mad(vertex_uniform_buffer_0[0u].w, vertex_unnamed_25, vertex_unnamed_41) + vertex_uniform_buffer_0[2u].w; precise float vertex_unnamed_70 = vertex_unnamed_59 + vertex_uniform_buffer_0[3u].x; precise float vertex_unnamed_71 = vertex_unnamed_60 + vertex_uniform_buffer_0[3u].y; precise float vertex_unnamed_72 = vertex_unnamed_61 + vertex_uniform_buffer_0[3u].z; precise float vertex_unnamed_73 = vertex_unnamed_62 + vertex_uniform_buffer_0[3u].w; gl_Position.x = vertex_unnamed_70; gl_Position.y = vertex_unnamed_71; gl_Position.z = vertex_unnamed_72; gl_Position.w = vertex_unnamed_73; } 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_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 #endif // !XR_OCCLUSION_MESH_COMBINED #ifdef STEREO_INSTANCING_ON #ifndef XR_OCCLUSION_MESH_COMBINED #define ANY_SHADER_VARIANT_ACTIVE float4x4 unity_ObjectToWorld; static float4 vertex_uniform_buffer_0[4]; 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() { float vertex_unnamed_25 = mad(vertex_input_0.x, 2.0f, -1.0f); float vertex_unnamed_28 = mad(vertex_input_0.y, -2.0f, 1.0f); precise float vertex_unnamed_38 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].x; precise float vertex_unnamed_39 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].y; precise float vertex_unnamed_40 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].z; precise float vertex_unnamed_41 = vertex_unnamed_28 * vertex_uniform_buffer_0[1u].w; precise float vertex_unnamed_59 = mad(vertex_uniform_buffer_0[0u].x, vertex_unnamed_25, vertex_unnamed_38) + vertex_uniform_buffer_0[2u].x; precise float vertex_unnamed_60 = mad(vertex_uniform_buffer_0[0u].y, vertex_unnamed_25, vertex_unnamed_39) + vertex_uniform_buffer_0[2u].y; precise float vertex_unnamed_61 = mad(vertex_uniform_buffer_0[0u].z, vertex_unnamed_25, vertex_unnamed_40) + vertex_uniform_buffer_0[2u].z; precise float vertex_unnamed_62 = mad(vertex_uniform_buffer_0[0u].w, vertex_unnamed_25, vertex_unnamed_41) + vertex_uniform_buffer_0[2u].w; precise float vertex_unnamed_70 = vertex_unnamed_59 + vertex_uniform_buffer_0[3u].x; precise float vertex_unnamed_71 = vertex_unnamed_60 + vertex_uniform_buffer_0[3u].y; precise float vertex_unnamed_72 = vertex_unnamed_61 + vertex_uniform_buffer_0[3u].z; precise float vertex_unnamed_73 = vertex_unnamed_62 + vertex_uniform_buffer_0[3u].w; gl_Position.x = vertex_unnamed_70; gl_Position.y = vertex_unnamed_71; gl_Position.z = vertex_unnamed_72; gl_Position.w = vertex_unnamed_73; } 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_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 #endif // !XR_OCCLUSION_MESH_COMBINED #ifdef XR_OCCLUSION_MESH_COMBINED #ifndef STEREO_INSTANCING_ON #define ANY_SHADER_VARIANT_ACTIVE float4x4 unity_ObjectToWorld; static float4 vertex_uniform_buffer_0[4]; static float4 gl_Position; static uint gl_Layer; static float4 vertex_input_0; struct Vertex_Stage_Input { float4 vertex_input_0 : POSITION; // POSITION }; struct Vertex_Stage_Output { float4 gl_Position : SV_Position; uint gl_Layer : SV_RenderTargetArrayIndex; }; void vert_main() { float vertex_unnamed_27 = mad(vertex_input_0.x, 2.0f, -1.0f); float vertex_unnamed_30 = mad(vertex_input_0.y, -2.0f, 1.0f); precise float vertex_unnamed_40 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].x; precise float vertex_unnamed_41 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].y; precise float vertex_unnamed_42 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].z; precise float vertex_unnamed_43 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].w; precise float vertex_unnamed_61 = mad(vertex_uniform_buffer_0[0u].x, vertex_unnamed_27, vertex_unnamed_40) + vertex_uniform_buffer_0[2u].x; precise float vertex_unnamed_62 = mad(vertex_uniform_buffer_0[0u].y, vertex_unnamed_27, vertex_unnamed_41) + vertex_uniform_buffer_0[2u].y; precise float vertex_unnamed_63 = mad(vertex_uniform_buffer_0[0u].z, vertex_unnamed_27, vertex_unnamed_42) + vertex_uniform_buffer_0[2u].z; precise float vertex_unnamed_64 = mad(vertex_uniform_buffer_0[0u].w, vertex_unnamed_27, vertex_unnamed_43) + vertex_uniform_buffer_0[2u].w; precise float vertex_unnamed_72 = vertex_unnamed_61 + vertex_uniform_buffer_0[3u].x; precise float vertex_unnamed_73 = vertex_unnamed_62 + vertex_uniform_buffer_0[3u].y; precise float vertex_unnamed_74 = vertex_unnamed_63 + vertex_uniform_buffer_0[3u].z; precise float vertex_unnamed_75 = vertex_unnamed_64 + vertex_uniform_buffer_0[3u].w; gl_Position.x = vertex_unnamed_72; gl_Position.y = vertex_unnamed_73; gl_Position.z = vertex_unnamed_74; gl_Position.w = vertex_unnamed_75; gl_Layer = int(uint(vertex_input_0.z)); } 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_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 // XR_OCCLUSION_MESH_COMBINED #endif // !STEREO_INSTANCING_ON #ifdef STEREO_INSTANCING_ON #ifdef XR_OCCLUSION_MESH_COMBINED #define ANY_SHADER_VARIANT_ACTIVE float4x4 unity_ObjectToWorld; static float4 vertex_uniform_buffer_0[4]; static float4 gl_Position; static uint gl_Layer; static float4 vertex_input_0; struct Vertex_Stage_Input { float4 vertex_input_0 : POSITION; // POSITION }; struct Vertex_Stage_Output { float4 gl_Position : SV_Position; uint gl_Layer : SV_RenderTargetArrayIndex; }; void vert_main() { float vertex_unnamed_27 = mad(vertex_input_0.x, 2.0f, -1.0f); float vertex_unnamed_30 = mad(vertex_input_0.y, -2.0f, 1.0f); precise float vertex_unnamed_40 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].x; precise float vertex_unnamed_41 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].y; precise float vertex_unnamed_42 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].z; precise float vertex_unnamed_43 = vertex_unnamed_30 * vertex_uniform_buffer_0[1u].w; precise float vertex_unnamed_61 = mad(vertex_uniform_buffer_0[0u].x, vertex_unnamed_27, vertex_unnamed_40) + vertex_uniform_buffer_0[2u].x; precise float vertex_unnamed_62 = mad(vertex_uniform_buffer_0[0u].y, vertex_unnamed_27, vertex_unnamed_41) + vertex_uniform_buffer_0[2u].y; precise float vertex_unnamed_63 = mad(vertex_uniform_buffer_0[0u].z, vertex_unnamed_27, vertex_unnamed_42) + vertex_uniform_buffer_0[2u].z; precise float vertex_unnamed_64 = mad(vertex_uniform_buffer_0[0u].w, vertex_unnamed_27, vertex_unnamed_43) + vertex_uniform_buffer_0[2u].w; precise float vertex_unnamed_72 = vertex_unnamed_61 + vertex_uniform_buffer_0[3u].x; precise float vertex_unnamed_73 = vertex_unnamed_62 + vertex_uniform_buffer_0[3u].y; precise float vertex_unnamed_74 = vertex_unnamed_63 + vertex_uniform_buffer_0[3u].z; precise float vertex_unnamed_75 = vertex_unnamed_64 + vertex_uniform_buffer_0[3u].w; gl_Position.x = vertex_unnamed_72; gl_Position.y = vertex_unnamed_73; gl_Position.z = vertex_unnamed_74; gl_Position.w = vertex_unnamed_75; gl_Layer = int(uint(vertex_input_0.z)); } 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_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 #endif // XR_OCCLUSION_MESH_COMBINED #ifndef STEREO_INSTANCING_ON #ifndef XR_OCCLUSION_MESH_COMBINED #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 = 0.0f; fragment_output_0.y = 0.0f; fragment_output_0.z = 0.0f; fragment_output_0.w = 0.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 #endif // !XR_OCCLUSION_MESH_COMBINED #ifdef STEREO_INSTANCING_ON #ifndef XR_OCCLUSION_MESH_COMBINED #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 = 0.0f; fragment_output_0.y = 0.0f; fragment_output_0.z = 0.0f; fragment_output_0.w = 0.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 #endif // !XR_OCCLUSION_MESH_COMBINED #ifdef XR_OCCLUSION_MESH_COMBINED #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 = 0.0f; fragment_output_0.y = 0.0f; fragment_output_0.z = 0.0f; fragment_output_0.w = 0.0f; } Fragment_Stage_Output frag() { frag_main(); Fragment_Stage_Output stage_output; stage_output.fragment_output_0 = fragment_output_0; return stage_output; } #endif // XR_OCCLUSION_MESH_COMBINED #endif // !STEREO_INSTANCING_ON #ifdef STEREO_INSTANCING_ON #ifdef XR_OCCLUSION_MESH_COMBINED #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 = 0.0f; fragment_output_0.y = 0.0f; fragment_output_0.z = 0.0f; fragment_output_0.w = 0.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 #endif // XR_OCCLUSION_MESH_COMBINED ENDHLSL } } }