Skip to content

Commit 67cf10f

Browse files
committed
vs_CellFace: Add log depth hook to fix cell edge geometry and mesh lines
vs_CellFace.glsl and vs_2dTextureCellFace.glsl were missing the calcLogDepth() call after setting gl_Position. This left v_logz undefined, causing fs_Standard's applyLogDepth() to write garbage gl_FragDepth values. Side faces disappeared and mesh lines were invisible because their log depth values failed the LEQUAL depth test against the incorrect surface depths.
1 parent 6a9b33a commit 67cf10f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

ApplicationExeCode/Resources/vs_2dTextureCellFace.glsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,8 @@ void main()
126126
v_ecNormal = cvfu_normalMatrix * cvfa_normal;
127127

128128
gl_Position = cvfu_modelViewProjectionMatrix*cvfa_vertex;
129+
#ifdef CVF_LOG_DEPTH_IMPL
130+
calcLogDepth(gl_Position);
131+
#endif
129132
}
130133

ApplicationExeCode/Resources/vs_CellFace.glsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,8 @@ void main()
177177
v_ecNormal = cvfu_normalMatrix * cvfa_normal;
178178

179179
gl_Position = cvfu_modelViewProjectionMatrix*cvfa_vertex;
180+
#ifdef CVF_LOG_DEPTH_IMPL
181+
calcLogDepth(gl_Position);
182+
#endif
180183
}
181184

0 commit comments

Comments
 (0)