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.
17 lines
509 B
17 lines
509 B
#ifndef UNITY_DECLARE_DEPTH_TEXTURE_INCLUDED |
|
#define UNITY_DECLARE_DEPTH_TEXTURE_INCLUDED |
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" |
|
|
|
TEXTURE2D_X_FLOAT(_CameraDepthTexture); |
|
SAMPLER(sampler_CameraDepthTexture); |
|
|
|
float SampleSceneDepth(float2 uv) |
|
{ |
|
return SAMPLE_TEXTURE2D_X(_CameraDepthTexture, sampler_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(uv)).r; |
|
} |
|
|
|
float LoadSceneDepth(uint2 uv) |
|
{ |
|
return LOAD_TEXTURE2D_X(_CameraDepthTexture, uv).r; |
|
} |
|
#endif
|
|
|