gearlib/assets/texture.frag

18 lines
345 B
GLSL
Raw Normal View History

2024-04-30 23:02:19 +12:00
#version 460 core
layout(location = 0) out vec4 color;
struct VertexOutput {
vec4 Tint;
vec2 TexCoord;
};
layout(location = 0) in VertexOutput Input;
2024-05-03 11:18:50 +12:00
layout(location = 2) in flat float TexID;
2024-04-30 23:02:19 +12:00
2024-05-03 11:18:50 +12:00
layout(binding = 0) uniform sampler2D textures[32];
2024-04-30 23:02:19 +12:00
void main() {
2024-05-03 11:18:50 +12:00
color = texture(textures[int(TexID)], Input.TexCoord) * Input.Tint;
2024-04-30 23:02:19 +12:00
}