SpatialMappingOcclusion.shader 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Shader "Universal Render Pipeline/VR/SpatialMapping/Occlusion"
  2. {
  3. SubShader
  4. {
  5. Tags { "RenderPipeline" = "UniversalPipeline" "Queue" = "Geometry-1" }
  6. LOD 100
  7. ZWrite On
  8. ZTest LEqual
  9. Colormask 0
  10. Cull Off
  11. Pass
  12. {
  13. Name "Spatial Mapping Occlusion"
  14. HLSLPROGRAM
  15. #pragma vertex vert
  16. #pragma fragment frag
  17. // -------------------------------------
  18. // Unity defined keywords
  19. #pragma multi_compile_instancing
  20. #include "UnlitInput.hlsl"
  21. struct Attributes
  22. {
  23. float4 positionOS : POSITION;
  24. UNITY_VERTEX_INPUT_INSTANCE_ID
  25. };
  26. struct Varyings
  27. {
  28. float4 vertex : SV_POSITION;
  29. UNITY_VERTEX_INPUT_INSTANCE_ID
  30. UNITY_VERTEX_OUTPUT_STEREO
  31. };
  32. Varyings vert(Attributes input)
  33. {
  34. Varyings output = (Varyings)0;
  35. UNITY_SETUP_INSTANCE_ID(input);
  36. UNITY_TRANSFER_INSTANCE_ID(input, output);
  37. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  38. VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);
  39. output.vertex = vertexInput.positionCS;
  40. return output;
  41. }
  42. half4 frag(Varyings input) : SV_Target
  43. {
  44. UNITY_SETUP_INSTANCE_ID(input);
  45. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
  46. return half4(0,0,0,0);
  47. }
  48. ENDHLSL
  49. }
  50. }
  51. FallBack "Hidden/Universal Render Pipeline/FallbackError"
  52. }