paint: path layer fixes
This commit is contained in:
@@ -54,7 +54,7 @@ f32 uniforms_ext_f32_link(object_t *object, material_data_t *mat, char *link) {
|
||||
}
|
||||
else if (string_equals(link, "_brush_opacity")) {
|
||||
f32 val = g_context->brush_opacity * g_context->brush_nodes_opacity;
|
||||
if (g_config->pressure_opacity && pen_down("tip")) {
|
||||
if (g_config->pressure_opacity && pen_down("tip") && !slot_layer_is_path(g_context->layer)) {
|
||||
val *= pen_pressure * g_config->pressure_sensitivity;
|
||||
}
|
||||
return val;
|
||||
@@ -65,7 +65,7 @@ f32 uniforms_ext_f32_link(object_t *object, material_data_t *mat, char *link) {
|
||||
return 1.0;
|
||||
}
|
||||
f32 val = fmaxf((g_context->brush_hardness * g_context->brush_nodes_hardness) - 0.02, 0.0);
|
||||
if (g_config->pressure_hardness && pen_down("tip")) {
|
||||
if (g_config->pressure_hardness && pen_down("tip") && !slot_layer_is_path(g_context->layer)) {
|
||||
val *= pen_pressure * g_config->pressure_sensitivity;
|
||||
}
|
||||
val *= val;
|
||||
@@ -154,7 +154,7 @@ vec2_t uniforms_ext_vec2_link(object_t *object, material_data_t *mat, char *link
|
||||
f32 brush_angle = g_context->brush_angle + g_context->brush_nodes_angle;
|
||||
f32 angle = g_context->layer->fill_material != NULL ? g_context->layer->angle : brush_angle;
|
||||
angle *= (math_pi() / 180.0);
|
||||
if (g_config->pressure_angle && pen_down("tip")) {
|
||||
if (g_config->pressure_angle && pen_down("tip") && !slot_layer_is_path(g_context->layer)) {
|
||||
angle *= pen_pressure * g_config->pressure_sensitivity;
|
||||
}
|
||||
return (vec2_t){math_cos(-angle), math_sin(-angle)};
|
||||
|
||||
Reference in New Issue
Block a user