rest-in-dust/assets/shaders/canvas_fragment.glsl

20 lines
281 B
Plaintext
Raw Normal View History

2023-11-14 00:14:08 +00:00
#version 130
in vec4 _color;
in vec2 _tex_coord;
out vec4 frag_color;
uniform sampler2D sampler;
uniform int has_texture;
void main() {
if (has_texture == 1)
{
frag_color = _color * texture(sampler, _tex_coord);
}
else
{
frag_color = _color;
}
}