Files
2026-03-05 10:28:05 +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