Use instanced arrays to draw the lights
This commit is contained in:
18
shaders/light_vert.glsl
Normal file
18
shaders/light_vert.glsl
Normal file
@@ -0,0 +1,18 @@
|
||||
#version 330 core
|
||||
|
||||
#define POINT_LIGHT_COUNT 4
|
||||
|
||||
layout(location=0) in vec3 position;
|
||||
layout(location=1) in vec3 normal;
|
||||
layout(location=2) in vec2 uv;
|
||||
layout(location=3) in mat4 model;
|
||||
|
||||
layout (std140) uniform Common {
|
||||
mat4 projection;
|
||||
mat4 view;
|
||||
vec3 camera_position;
|
||||
};
|
||||
|
||||
void main() {
|
||||
gl_Position = projection * view * model * vec4(position, 1.0);
|
||||
};
|
||||
Reference in New Issue
Block a user