bgfx/examples/common/imgui/fs_imgui_texture.sc

17 lines
340 B
Python
Raw Normal View History

2013-04-25 08:01:11 +04:00
$input v_texcoord0, v_color0
/*
2014-02-11 10:07:04 +04:00
* Copyright 2011-2014 Branimir Karadzic. All rights reserved.
2013-04-25 08:01:11 +04:00
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include <bgfx_shader.sh>
SAMPLER2D(u_texColor, 0);
void main()
{
float alpha = texture2D(u_texColor, v_texcoord0).x;
gl_FragColor = vec4(v_color0.xyz, v_color0.w * alpha);
}