Files
Convention-Unity-Demo/Assets/Plugins/Unity-URP-Volumetric-Light-0.5.8/Shaders/DeclareDownsampledDepthTexture.hlsl

15 lines
485 B
HLSL
Raw Normal View History

2025-09-25 19:04:05 +08:00
#ifndef DECLARE_DOWNSAMPLED_DEPTH_TEXTURE_INCLUDED
#define DECLARE_DOWNSAMPLED_DEPTH_TEXTURE_INCLUDED
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/GlobalSamplers.hlsl"
TEXTURE2D_X_FLOAT(_DownsampledCameraDepthTexture);
float4 _DownsampledCameraDepthTexture_TexelSize;
// Samples the downsampled camera depth texture.
float SampleDownsampledSceneDepth(float2 uv)
{
return SAMPLE_TEXTURE2D_X(_DownsampledCameraDepthTexture, sampler_PointClamp, uv).r;
}
#endif