Files
3d-bxqz/Assets/MeiGongZiYuan/Water/Shaders/BGWaterOrtho.hlsl
2026-05-06 17:36:41 +08:00

17 lines
292 B
HLSL

#ifndef BADDOG_WATER_ORTHO
#define BADDOG_WATER_ORTHO
inline float GetOrthoEyeDepth(float rawDepth)
{
#if defined(UNITY_REVERSED_Z)
#if UNITY_REVERSED_Z == 1
rawDepth = 1.0f - rawDepth;
#endif
#endif
return lerp(_ProjectionParams.y, _ProjectionParams.z, rawDepth);
}
#endif