fix: correct matrix order (proj*view) + Z depth range for Vulkan
- VP matrix order: proj*view (GLSL column-vector convention) - Z correction in vertex shader: gl_Position.z = (z+w)*0.5 (OpenGL [-1,1] → Vulkan [0,1]) - Depth test temporarily disabled for debugging
This commit is contained in:
@@ -17,6 +17,7 @@ layout(row_major, push_constant) uniform PC {
|
||||
|
||||
void main() {
|
||||
gl_Position = vp * pc.model * vec4(inPosition, 1.0);
|
||||
gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5;
|
||||
fragColor = inColor;
|
||||
fragNormal = mat3(pc.model) * inNormal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user