#Vertex buffer data not going to shader vertex shader

4 messages · Page 1 of 1 (latest)

boreal sphinx
#

Im using both a vertex and index buffer each vertex just be a vec3f, I used Nvidia Nsight Graphics to look at the resources and youll see the same buffer being shown side to side, one with the vertices all showing 0, you'll see the same buffer is filled, for some reason in the input assember, it seems that all the vertices are 0, not sure why

#
if let Some(mesh) = mesh {
            unsafe {
                self.vulkan_dep.device().cmd_bind_vertex_buffers(
                    command_buffer.command_buffer(),
                    0,
                    &[mesh.vertex_buffer.buffer()],
                    &[0],
                );

                self.vulkan_dep.device().cmd_bind_index_buffer(
                    command_buffer.command_buffer(),
                    mesh.index_buffer.buffer(),
                    0,
                    vk::IndexType::UINT32,
                );
            }

            unsafe {
                self.vulkan_dep.device().cmd_draw_indexed(
                    command_buffer.command_buffer(),
                    mesh.vertex_count,
                    1,
                    0,
                    0,
                    0,
                );
            }
            println!("Drawn mesh vertices {} ", mesh.vertex_count,);
        }```
steel epoch
#

that does not show your buffer having any sane data, you have a repeating pattern of 2 bytes written followed by 2 blank bytes

#

this means either your vertex attribues was configured wrong or you copied wrongl y or both