20 lines
325 B
GLSL
20 lines
325 B
GLSL
#version 450 core
|
|
|
|
in vec2 v_texCoord;
|
|
in vec4 v_color;
|
|
|
|
uniform sampler2D u_texture;
|
|
uniform float u_opacity;
|
|
|
|
out vec4 fragColor;
|
|
|
|
void main() {
|
|
vec4 texColor = texture(u_texture, v_texCoord);
|
|
fragColor = texColor * v_color;
|
|
fragColor.a *= u_opacity;
|
|
|
|
if (fragColor.a < 0.01) {
|
|
discard;
|
|
}
|
|
}
|