custom_material.vert: gl_InstanceIndex includes gl_BaseInstance (#9326)

Fixes shader_material_glsl on DX12 too.
This commit is contained in:
Robert Swain 2023-08-01 10:02:16 +02:00 committed by GitHub
parent c6a1bf063b
commit dde8518f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}