pituicat/res/shaders/frag.shader

19 lines
399 B
Text
Raw Normal View History

2021-01-03 09:19:05 +00:00
#version 400 core
2020-12-06 07:14:05 +00:00
layout(location = 0) out vec4 color;
in vec4 v_color;
in vec2 v_texCoord;
in float v_texIndex;
2020-12-23 06:47:20 +00:00
uniform sampler2D[2] u_textures;
2020-12-06 07:14:05 +00:00
void main()
{
//vec4 texColor = texture(u_texture, v_texCoord);
2020-12-23 06:47:20 +00:00
int index = int(v_texIndex);
2020-12-23 15:39:45 +00:00
//color = texture(u_textures[index], v_texCoord);
color = texture(u_textures[index], v_texCoord) * v_color;
2020-12-14 02:12:33 +00:00
//color = vec4(0.0, 1.0, 0.0, 1.0);
2020-12-06 07:14:05 +00:00
}