fix pressure spacing, blend mode preview

This commit is contained in:
2019-06-25 22:16:36 +02:00
parent 746726e5b3
commit a15d3acaef
4 changed files with 13 additions and 3 deletions

View File

@@ -415,7 +415,10 @@ void NodeStrokePreview::draw_stroke_immediate()
}
ShaderManager::use(kShader::Stroke);
ShaderManager::u_vec4(kShaderUniform::Col, { 0, 0, 0, 1 } /*f.col*/);
if (b->m_blend_mode != 0)
ShaderManager::u_vec4(kShaderUniform::Col, { .7, .4, .1, 1 } /*f.col*/);
else
ShaderManager::u_vec4(kShaderUniform::Col, { 0, 0, 0, 1 } /*f.col*/);
ShaderManager::u_float(kShaderUniform::Alpha, glm::max(f.flow, m_min_flow));
ShaderManager::u_float(kShaderUniform::Opacity, f.opacity);
/*auto rect =*/ stroke_draw_samples(f.shapes, m_tex);
@@ -505,6 +508,10 @@ void NodeStrokePreview::draw_stroke()
s_renderer = std::thread([] {
BT_SetTerminate();
#if __OSX__
// There's some weird multithread bug at startup
// This random wait is a temp fix
// Today is 25/05/2019
// Good luck, future Omar
std::this_thread::sleep_for(std::chrono::seconds(1));
#endif
App::I.async_start();