opacity control

This commit is contained in:
2017-04-07 12:57:21 +01:00
parent d340324c3d
commit 2b4915154e
5 changed files with 17 additions and 5 deletions

View File

@@ -1798,6 +1798,7 @@ public:
NodeSliderH* m_tip_size;
NodeSliderH* m_tip_spacing;
NodeSliderH* m_tip_flow;
NodeSliderH* m_tip_opacity;
NodeSliderH* m_tip_angle;
NodeSliderH* m_jitter_scale;
NodeSliderH* m_jitter_angle;
@@ -1822,6 +1823,7 @@ public:
init_slider(m_tip_size, "tip-size", &ui::Brush::m_tip_size);
init_slider(m_tip_spacing, "tip-spacing", &ui::Brush::m_tip_spacing);
init_slider(m_tip_flow, "tip-flow", &ui::Brush::m_tip_flow);
init_slider(m_tip_opacity, "tip-opacity", &ui::Brush::m_tip_opacity);
init_slider(m_tip_angle, "tip-angle", &ui::Brush::m_tip_angle);
init_slider(m_jitter_scale, "jitter-scale", &ui::Brush::m_jitter_scale);
init_slider(m_jitter_angle, "jitter-angle", &ui::Brush::m_jitter_angle);
@@ -1904,7 +1906,7 @@ public:
ui::ShaderManager::use(kShader::TextureAlpha);
ui::ShaderManager::u_int(kShaderUniform::Tex, 0);
ui::ShaderManager::u_mat4(kShaderUniform::MVP, mvp);
ui::ShaderManager::u_float(kShaderUniform::Alpha, .5);
ui::ShaderManager::u_float(kShaderUniform::Alpha, m_canvas->m_current_stroke->m_brush.m_tip_opacity);
m_canvas->m_tmp.bindTexture();
NodeBorder::m_plane.draw_fill();
m_canvas->m_tmp.unbindTexture();