Files
Cielonos/Assets/PotaToon/Shaders/OIT/OITOutlineUtils.hlsl
SoulliesOfficial f7af60351b 阶段性完成
2025-12-08 05:27:53 -05:00

16 lines
414 B
HLSL

#ifndef OIT_OUTLINE_UTILS_INCLUDED
#define OIT_OUTLINE_UTILS_INCLUDED
TEXTURE2D(_OITDepthTexture);
SAMPLER(sampler_OITDepthTexture);
bool SampleOITDepth(float2 uv, float z)
{
#if UNITY_REVERSED_Z
return SAMPLE_TEXTURE2D(_OITDepthTexture, sampler_OITDepthTexture, uv).r > z;
#else
return SAMPLE_TEXTURE2D(_OITDepthTexture, sampler_OITDepthTexture, uv).r < z;
#endif
}
#endif // OIT_OUTLINE_UTILS_INCLUDED