mirror of
https://github.com/brammie15/VoxelRenderer.git
synced 2025-12-16 18:01:49 +01:00
34 lines
585 B
GLSL
34 lines
585 B
GLSL
#version 330 core
|
|
|
|
layout (location = 0) in vec3 aPos;
|
|
layout (location = 1) in vec3 aColor;
|
|
layout (location = 2) in vec2 aTexCoord;
|
|
|
|
out vec3 ourColor;
|
|
out vec2 TexCoord;
|
|
|
|
uniform mat4 model;
|
|
uniform mat4 view;
|
|
uniform mat4 projection;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = projection * view * model * vec4(aPos, 1.0);
|
|
ourColor = aColor;
|
|
TexCoord = aTexCoord;
|
|
}
|
|
|
|
|
|
#version 330 core
|
|
out vec4 FragColor;
|
|
|
|
in vec3 ourColor;
|
|
in vec2 TexCoord;
|
|
|
|
uniform sampler2D ourTexture;
|
|
|
|
void main()
|
|
{
|
|
FragColor = texture(ourTexture, TexCoord);
|
|
// FragColor = vec4(1.0f, 1.0f, 0.0f, 1.0);
|
|
} |