fix transform commit shader

This commit is contained in:
2018-11-23 14:19:59 +01:00
parent 86656cc7e3
commit a124d19bdc
11 changed files with 90 additions and 29 deletions

View File

@@ -101,6 +101,7 @@ void App::initShaders()
//"uniform image2D img_mixer;\n"
"uniform mediump float alpha;\n"
"uniform mediump int blend_mode;\n"
"uniform mediump vec2 resolution;\n"
"uniform bool lock;\n"
"uniform bool mask;\n"
"in mediump vec3 uv;\n"
@@ -139,7 +140,7 @@ void App::initShaders()
"}\n"
"void main(){\n"
" mediump vec4 base = texture(tex, uv.xy);\n"
" mediump vec4 base = texture(tex, gl_FragCoord.st / resolution);\n"
" mediump vec4 stroke = texture(tex_stroke, uv.xy);\n"
" stroke.a = mask ? stroke.a * alpha * blur(tex_mask, uv.xy).r : stroke.a * alpha;\n"