stencil in brush preview

This commit is contained in:
2017-10-22 19:58:20 +01:00
parent 856628162a
commit 2a92beca7b
6 changed files with 49 additions and 20 deletions

View File

@@ -258,7 +258,7 @@ void App::initShaders()
#endif
"void main(){\n"
" mediump vec2 uv2 = gl_FragCoord.st / resolution;\n"
" mediump float stencil = 1-(texture(tex_stencil, (uv2+stencil_offset) * 5.0).r * 0.9) * stencil_alpha;\n"
" mediump float stencil = 1.0 - (texture(tex_stencil, (uv2+stencil_offset) * 2.0).r * 0.9) * stencil_alpha;\n"
" mediump float brush_alpha = ( 1.0 - texture(tex, uv/q).r ) * alpha;\n"
" mediump vec4 fg = vec4(col.rgb, brush_alpha);\n"
#ifdef __IOS__