Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Shader "Hidden/Universal Render Pipeline/Blit"
  2. {
  3. SubShader
  4. {
  5. Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline"}
  6. LOD 100
  7. Pass
  8. {
  9. Name "Blit"
  10. ZTest Always
  11. ZWrite Off
  12. Cull Off
  13. HLSLPROGRAM
  14. #pragma vertex Vert
  15. #pragma fragment Fragment
  16. #pragma multi_compile_fragment _ _LINEAR_TO_SRGB_CONVERSION
  17. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  18. // Core.hlsl for XR dependencies
  19. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  20. #include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl"
  21. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/DebuggingFullscreen.hlsl"
  22. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  23. SAMPLER(sampler_BlitTexture);
  24. half4 Fragment(Varyings input) : SV_Target
  25. {
  26. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
  27. float2 uv = input.texcoord;
  28. half4 col = SAMPLE_TEXTURE2D_X(_BlitTexture, sampler_BlitTexture, uv);
  29. #ifdef _LINEAR_TO_SRGB_CONVERSION
  30. col = LinearToSRGB(col);
  31. #endif
  32. #if defined(DEBUG_DISPLAY)
  33. half4 debugColor = 0;
  34. if(CanDebugOverrideOutputColor(col, uv, debugColor))
  35. {
  36. return debugColor;
  37. }
  38. #endif
  39. return col;
  40. }
  41. ENDHLSL
  42. }
  43. }
  44. }