17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-28 16:57:29 +01:00

Draw the instances from the GPU with multi draws, the model block of each draw read by its number

This commit is contained in:
2026-10-18 00:47:05 +02:00
parent 7221c153dd
commit 494304903f
18 changed files with 609 additions and 64 deletions

View File

@@ -17,4 +17,7 @@ void main()
vec4 position = mv * vec4(v_vert, 1.0);
gl_Position = projection * position;
f_coord = v_coord;
#ifdef MODEL_DRAWS
f_model_draw = uint(gl_DrawID);
#endif
}

View File

@@ -48,4 +48,8 @@ void main()
// TangentViewPos = TBN * vec3(0.0, 0.0, 0.0);
TangentFragPos = TBN * f_pos.xyz;
UserData = v_userdata;
#ifdef MODEL_DRAWS
// which model block of the multi draw the fragments read (glsl_common)
f_model_draw = uint(gl_DrawID);
#endif
}