Computer Graphics, Opengl, 3d Modeling, 3d Design.
position_vcs_z. #version 330 core in vec4 position_lcs; uniform mat4 P; uniform mat4 V; uniform mat4 M; out float position_vcs_z; void main() { position_wcs = M * position_lcs; vec4 position_vcs = V * position_wcs; position_vcs_z = position_vcs.z; gl_Position = P * position_vcs; } And the following