chunk 1: core gameplay scripts scenes runtime assets

This commit is contained in:
2026-04-06 11:02:34 +03:00
parent fa0388bc79
commit 0d11a097d8
703 changed files with 2292651 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
TEXTURE2D_X_FLOAT(_HalfResCameraDepthTexture);
float4 _HalfResCameraDepthTexture_TexelSize;
// Samples the half resolution camera depth texture and returns the depth considering UNITY_REVERSED_Z.
float SampleDownsampledSceneDepthConsiderReversedZ(float2 uv)
{
float depth = SAMPLE_TEXTURE2D_X(_HalfResCameraDepthTexture, sampler_PointClamp, UnityStereoTransformScreenSpaceTex(uv)).r;
#if !UNITY_REVERSED_Z
depth = lerp(UNITY_NEAR_CLIP_VALUE, 1.0, depth);
#endif
return depth;
}