1234567891011121314151617181920212223242526272829303132333435363738 |
- #version 430
- layout (location = 0) in vec3 pos;
- layout (location = 1) in vec2 tex;
- layout (location = 2) in vec4 vertexColor;
- layout (binding = 0) uniform sampler2D samp;
- uniform mat4 viewMatrix;
- uniform mat4 modelMatrix;
- uniform vec3 ambientLight;
- struct Light
- {
- vec2 pos;
- float strength;
- vec3 color;
- };
- uniform Light lights[32];
- uniform bool useTexture;
- uniform bool useColor;
- uniform bool useLight;
- out vec2 tc;
- out vec2 loc;
- out vec4 vColor;
- void main(void)
- {
- loc = pos.xy;
- gl_Position = viewMatrix * modelMatrix * vec4(pos, 1.0);
- tc = tex;
- vColor = vertexColor;
- }
|