FallbackError.shader 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Shader to use as a fallback error when rendering UniversalRP materials with built-in pipeline
  2. Shader "Hidden/Universal Render Pipeline/FallbackError"
  3. {
  4. SubShader
  5. {
  6. Pass
  7. {
  8. CGPROGRAM
  9. #pragma vertex vert
  10. #pragma fragment frag
  11. #pragma target 2.0
  12. #pragma multi_compile _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON
  13. #include "UnityCG.cginc"
  14. struct appdata_t
  15. {
  16. float4 vertex : POSITION;
  17. UNITY_VERTEX_INPUT_INSTANCE_ID
  18. };
  19. struct v2f
  20. {
  21. float4 vertex : SV_POSITION;
  22. UNITY_VERTEX_OUTPUT_STEREO
  23. };
  24. v2f vert(appdata_t v)
  25. {
  26. v2f o;
  27. UNITY_SETUP_INSTANCE_ID(v);
  28. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  29. o.vertex = UnityObjectToClipPos(v.vertex);
  30. return o;
  31. }
  32. fixed4 frag(v2f i) : SV_Target
  33. {
  34. return fixed4(1,0,1,1);
  35. }
  36. ENDCG
  37. }
  38. }
  39. Fallback Off
  40. }