mirror of
https://github.com/brammie15/VoxelRenderer.git
synced 2025-12-18 10:39:20 +01:00
Add MC
This commit is contained in:
34
gloom/shaders/simple.shader
Normal file
34
gloom/shaders/simple.shader
Normal file
@@ -0,0 +1,34 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user