fix: VK_INDEX_TYPE_UINT32 (was UINT16) + remove unused depth from pipeline
- vkCmdBindIndexBuffer indexType changed from 0 (UINT16) to 1 (UINT32) to match uint[] index data — this was causing black screen - Removed depth stencil state, depth attachment format, and depth rendering attachment from pipeline/renderer (depth buffer still created in swapchain but unused)
This commit is contained in:
@@ -5,19 +5,23 @@ layout(location = 1) in vec3 inColor;
|
||||
layout(location = 2) in vec3 inNormal;
|
||||
|
||||
layout(location = 0) out vec3 fragColor;
|
||||
layout(location = 1) out vec3 fragNormal;
|
||||
|
||||
layout(row_major, set = 0, binding = 0) uniform CameraUBO {
|
||||
mat4 vp;
|
||||
};
|
||||
|
||||
layout(row_major, push_constant) uniform PC {
|
||||
mat4 model;
|
||||
layout(push_constant) uniform PC {
|
||||
float angle;
|
||||
} pc;
|
||||
|
||||
void main() {
|
||||
gl_Position = vp * pc.model * vec4(inPosition, 1.0);
|
||||
gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5;
|
||||
float c = cos(pc.angle);
|
||||
float s = sin(pc.angle);
|
||||
vec3 rotated = vec3(
|
||||
inPosition.x * c - inPosition.y * s,
|
||||
inPosition.x * s + inPosition.y * c,
|
||||
inPosition.z
|
||||
);
|
||||
gl_Position = vp * vec4(rotated, 1.0);
|
||||
fragColor = inColor;
|
||||
fragNormal = mat3(pc.model) * inNormal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user