v4k-git-backup/engine/art/shaders/rect_2d.fs

15 lines
311 B
Forth
Raw Normal View History

2023-11-26 15:27:33 +00:00
uniform sampler2D texture0; /*unit0*/
uniform vec4 u_tint;
uniform int u_has_tex;
in vec2 uv;
out vec4 fragcolor;
void main() {
vec4 texel = texture( texture0, uv );
if (u_has_tex > 0) {
fragcolor = vec4(texel.xyz*u_tint.xyz, texel.a*u_tint.a);
} else {
fragcolor = u_tint;
}
}