Rasterizer: Implemented instanced rendering.

We keep track of the current instance and update an uniform in the shaders to let them know which instance they are.

Instanced vertex arrays are not yet implemented.
This commit is contained in:
Subv
2018-08-11 19:21:31 -05:00
parent 3aad82b1a3
commit c5284efd4f
7 changed files with 28 additions and 5 deletions

View File

@@ -38,6 +38,7 @@ out vec4 position;
layout (std140) uniform vs_config {
vec4 viewport_flip;
uvec4 instance_id;
};
void main() {
@@ -90,6 +91,7 @@ out vec4 color;
layout (std140) uniform fs_config {
vec4 viewport_flip;
uvec4 instance_id;
};
void main() {