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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user