Added instanced drawing to the GBuffer

This commit is contained in:
grayson committed 2021-10-01 14:16:47 -05:00
1 parent ba19742bfe
commit f422d1d138
14 files changed
+63 -179

No files matched your search

@@ -3,10 +3,10 @@
layout(location = 0) in vec3 pos;
uniform mat4 lightSpace;
uniform mat4 model;
uniform mat4 model[60];
out vec3 texCoord;
void main() {
gl_Position = lightSpace * model * vec4(pos, 1.0);
gl_Position = lightSpace * model[gl_InstanceID] * vec4(pos, 1.0);
}
@@ -2,8 +2,8 @@
layout(location = 0) in vec3 pos;
uniform mat4 model;
uniform mat4 model[60];
void main() {
gl_Position = model * vec4(pos, 1.0);
gl_Position = model[gl_InstanceID] * vec4(pos, 1.0);
}