DeclareOpaqueTexture.hlsl 516 B

1234567891011121314151617
  1. #ifndef UNITY_DECLARE_OPAQUE_TEXTURE_INCLUDED
  2. #define UNITY_DECLARE_OPAQUE_TEXTURE_INCLUDED
  3. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  4. TEXTURE2D_X(_CameraOpaqueTexture);
  5. SAMPLER(sampler_CameraOpaqueTexture);
  6. float3 SampleSceneColor(float2 uv)
  7. {
  8. return SAMPLE_TEXTURE2D_X(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, UnityStereoTransformScreenSpaceTex(uv)).rgb;
  9. }
  10. float3 LoadSceneColor(uint2 uv)
  11. {
  12. return LOAD_TEXTURE2D_X(_CameraOpaqueTexture, uv).rgb;
  13. }
  14. #endif