Skip to content

Commit

Permalink
custom_material.vert: gl_InstanceIndex includes gl_BaseInstance (#9326)
Browse files Browse the repository at this point in the history
Fixes shader_material_glsl on DX12 too.
  • Loading branch information
superdump authored Aug 1, 2023
1 parent c6a1bf0 commit dde8518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/shaders/custom_material.vert
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ layout(set = 2, binding = 0) readonly buffer _Meshes {
void main() {
v_Uv = Vertex_Uv;
gl_Position = ViewProj
* Meshes[gl_BaseInstance + gl_InstanceIndex].Model
* Meshes[gl_InstanceIndex].Model
* vec4(Vertex_Position, 1.0);
}

0 comments on commit dde8518

Please sign in to comment.