// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // File : h_WOWvx.fx // Purpose : Header file shared by WOWvx.fx and the main game code // Path : // Created : 17.6.7 // Author : Phil Palmer (http://www.programmerart.org) // Info : // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #ifndef __HFX_WOWVX__ #define __HFX_WOWVX__ float GetZBufferDepth(const float viewSpaceDepthIn, const float nearClipIn, const float farClipIn) { return (farClipIn*(viewSpaceDepthIn-nearClipIn)) / (viewSpaceDepthIn*(farClipIn-nearClipIn)); } #endif// ndef __HFX_WOWVX__