pituicat/res/shaders/frag.shader
2021-01-03 10:19:05 +01:00

18 lines
399 B
GLSL

#version 400 core
layout(location = 0) out vec4 color;
in vec4 v_color;
in vec2 v_texCoord;
in float v_texIndex;
uniform sampler2D[2] u_textures;
void main()
{
//vec4 texColor = texture(u_texture, v_texCoord);
int index = int(v_texIndex);
//color = texture(u_textures[index], v_texCoord);
color = texture(u_textures[index], v_texCoord) * v_color;
//color = vec4(0.0, 1.0, 0.0, 1.0);
}