123456789101112131415161718192021222324252627282930313233343536373839 |
- #version 430
- layout (location = 0) in vec2 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 float depth;
- 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;
- gl_Position = viewMatrix * modelMatrix * vec4(pos, depth, 1.0);
- tc = tex;
- vColor = vertexColor;
- }
|