untitled/shaders/triangle.frag
2025-07-30 13:14:22 +01:00

12 lines
376 B
GLSL

#version 330 core
out vec4 FragColor;
in vec3 color; // Input color from the vertex shader
in vec2 TexCoord;
uniform sampler2D texture1; // Texture sampler
uniform sampler2D texture2; // Second texture sampler
void main() {
FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), 0.3) * vec4(color, 1.0); // Mix the two textures and apply the color
}