layer highlight when selected
This commit is contained in:
@@ -38,10 +38,14 @@ void App::initShaders()
|
||||
SHADER_VERSION
|
||||
"uniform sampler2D tex;\n"
|
||||
"uniform mediump float alpha;\n"
|
||||
"uniform bool highlight;\n"
|
||||
"in mediump vec3 uv;\n"
|
||||
"out mediump vec4 frag;\n"
|
||||
"void main(){\n"
|
||||
" frag = texture(tex, uv.xy) * vec4(1,1,1,alpha);\n"
|
||||
" mediump vec4 c = texture(tex, uv.xy);\n"
|
||||
" frag = highlight ? \n"
|
||||
" vec4(clamp(vec3(.3)+c.rgb, vec3(0), vec3(1)), c.a) : \n"
|
||||
" texture(tex, uv.xy) * vec4(1,1,1,alpha);\n"
|
||||
"}\n";
|
||||
// TEXTURE COMP ERASE
|
||||
static const char* shader_comp_erase_f =
|
||||
|
||||
Reference in New Issue
Block a user