voksel/res/shaders/chunk.vs.glsl

18 lines
427 B
Text
Raw Normal View History

2021-08-26 16:26:45 +03:00
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec2 texCoord;
2022-11-05 20:14:50 +02:00
layout (location = 2) in vec4 light;
layout (location = 3) in float sunlight;
2021-08-26 16:26:45 +03:00
out vec2 passTexCoord;
2021-09-12 19:59:23 +03:00
out vec3 passLight;
2021-08-26 16:26:45 +03:00
2022-11-05 20:14:50 +02:00
uniform mat4 mvpMatrix;
uniform float globalSunlight;
2021-08-26 16:26:45 +03:00
void main() {
2022-11-05 20:14:50 +02:00
gl_Position = mvpMatrix * vec4(pos, 1.0f);
2021-09-12 19:59:23 +03:00
passTexCoord = vec2(texCoord.x, 1.0f - texCoord.y);
2022-11-05 20:14:50 +02:00
passLight = light.rgb * light.a;
}