NouVeL/ADVect/shaders/ImageAlpha/ImageAlpha.frag

16 lines
282 B
GLSL
Raw Normal View History

$input v_texcoord0
#include <bgfx_shader.sh>
#include <shaderlib.sh>
uniform vec4 f_opacity;
SAMPLER2D(s_texColor, 0);
void main()
{
2022-08-23 18:02:15 -04:00
vec2 uv = vec2(v_texcoord0.x, 1.0f - v_texcoord0.y);
vec4 tx = texture2D(s_texColor, uv);
gl_FragColor = vec4(tx.rgb, f_opacity.x * tx.a);
}