improving brush tips browser, average stroke direction

This commit is contained in:
2019-01-31 13:56:54 +01:00
parent ff633eb2c8
commit c451acb6bc
8 changed files with 61 additions and 26 deletions

View File

@@ -58,6 +58,8 @@ struct StrokeSample
bool valid() const
{
return !(
glm::isnan(angle) ||
glm::isinf(angle) ||
glm::any(glm::isnan(col)) ||
glm::any(glm::isnan(pos)) ||
glm::any(glm::isnan(origin))
@@ -100,7 +102,7 @@ public:
bool m_filter_points = true;
Camera m_camera;
std::shared_ptr<Brush> m_brush;
cbuffer<float, 3> m_curve_angles;
cbuffer<glm::vec2, 3> m_direction;
cbuffer<float, 10> m_pressure_buff;
cbuffer<glm::vec3, 3> m_hsv_jitter;
StrokeSample m_prev_sample;