remove unused shaders, fix color blending algorithm in shader

This commit is contained in:
2017-08-18 02:01:35 +01:00
parent 90ee185dcd
commit de59ae151c
6 changed files with 36 additions and 155 deletions

View File

@@ -164,7 +164,7 @@ ui::StrokeSample ui::Stroke::randomize_sample(const glm::vec2& pos, float pressu
StrokeSample s;
s.angle = (m_brush.m_tip_angle + rnd_nor() * m_brush.m_jitter_angle) * (float)(M_PI * 2.0);
s.pos = pos + (rnd_vec() * m_brush.m_jitter_spread * 100.f);
s.size = 800.f * glm::pow(m_brush.m_tip_size, 2.f) * (1.f - rnd_nor() * m_brush.m_jitter_scale);
s.size = 800.f * glm::pow(m_brush.m_tip_size, 3.f) * (1.f - rnd_nor() * m_brush.m_jitter_scale);
s.flow = glm::pow(m_brush.m_tip_flow, 2.f) * (1.f - rnd_nor() * m_brush.m_jitter_flow) * pressure;
return s;
}
@@ -214,7 +214,7 @@ void ui::Stroke::start(const ui::Brush& brush)
{
m_last_kp = 0;
m_dist = 0.f;
m_step = glm::max(brush.m_tip_spacing * 10, 1.f);
m_step = glm::max(brush.m_tip_spacing * brush.m_tip_size * 100, 1.f);
m_brush = brush;
prng.seed(0);
}