2 #extension GL_EXT_buffer_reference : enable
4 layout(buffer_reference, std430) buffer MeshVertexPositions {
9 MeshVertexPositions positions;
12 layout(set = 0, binding = 0) readonly buffer PerPass_meshes {
16 layout(location = 0) out vec4 out_fragColor;
18 layout(location = 0) in flat uint tri_idx0;
21 Mesh meshData = perPass_meshes.data[tri_idx0];
23 vec3 vertex_pos0 = vec3(meshData.positions.data[3 * tri_idx0],
24 meshData.positions.data[3 * tri_idx0 + 1],
25 meshData.positions.data[3 * tri_idx0 + 2]);
27 out_fragColor = vec4(vertex_pos0, 1.0);