diff --git a/shaders/shader.frag b/shaders/shader.frag new file mode 100644 index 0000000..f5a29ee --- /dev/null +++ b/shaders/shader.frag @@ -0,0 +1,15 @@ +#version 330 core +out vec4 FragColor; + +in vec3 ourColor; +in vec2 TexCoord; + +uniform sampler2D texture1; +uniform sampler2D texture2; + +void main() +{ + FragColor = mix(texture(texture1, TexCoord), + texture(texture2, TexCoord), + 0.2); +} diff --git a/shaders/shader.vert b/shaders/shader.vert new file mode 100644 index 0000000..a10ed17 --- /dev/null +++ b/shaders/shader.vert @@ -0,0 +1,14 @@ +#version 330 core +layout (location = 0) in vec3 aPos; +layout (location = 1) in vec2 aTexCoord; + +out vec2 TexCoord; +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; + +void main() +{ + gl_Position = projection * view * model * vec4(aPos, 1.0); + TexCoord = vec2(aTexCoord.x, aTexCoord.y); +}