Computer Graphics, Opengl, 3d Modeling, 3d Design.
log( max( 1.0e-30, -1.0 * position_vcs.z ) ); float log_z_ndcs = (log_z_vcs - log_near)/(log_far - log_near) * 2.0 - 1.0; gl_Position.z = log_z_ndcs * gl_Position.w; } Issue: Geometric Distortion Assigning the depth in gl_Position enables the early fragment test, and hence it can reduce the GPU