From 0c0ae2b274153f2258242170914c290366a8c92f Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 17 Apr 2026 16:16:30 +0200 Subject: [PATCH] paint: tweak 2d view brush size --- paint/sources/base.c | 2 +- paint/sources/uniforms_ext.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paint/sources/base.c b/paint/sources/base.c index 312ac8af..04dfd063 100644 --- a/paint/sources/base.c +++ b/paint/sources/base.c @@ -1573,7 +1573,7 @@ void ui_base_render_cursor(void *_) { } gpu_texture_t *cursor_img = resource_get("cursor.k"); - i32 psize = math_floor(182 * (g_context->brush_radius * g_context->brush_nodes_radius) * UI_SCALE()); + i32 psize = math_floor(182 * (g_context->brush_radius * 0.5 * g_context->brush_nodes_radius) * UI_SCALE()); // Clone source cursor if (g_context->tool == TOOL_TYPE_CLONE && !keyboard_down("alt") && (mouse_down("left") || pen_down("tip"))) { diff --git a/paint/sources/uniforms_ext.c b/paint/sources/uniforms_ext.c index e130128d..9f9e8cad 100644 --- a/paint/sources/uniforms_ext.c +++ b/paint/sources/uniforms_ext.c @@ -14,7 +14,7 @@ f32 uniforms_ext_f32_link(object_t *object, material_data_t *mat, char *link) { bool decal_mask = decal && operator_shortcut(string("%s+%s", any_map_get(config_keymap, "decal_mask"), any_map_get(config_keymap, "action_paint")), SHORTCUT_TYPE_DOWN); f32 brush_decal_mask_radius = g_context->brush_decal_mask_radius; - brush_decal_mask_radius *= g_context->paint2d ? 0.55 * ui_view2d_pan_scale : 2.0; + brush_decal_mask_radius *= g_context->paint2d ? 0.35 * ui_view2d_pan_scale : 2.0; f32 radius = decal_mask ? brush_decal_mask_radius : g_context->brush_radius; f32 val = (radius * g_context->brush_nodes_radius) / 15.0; if (g_config->pressure_radius && pen_down("tip")) { @@ -22,7 +22,7 @@ f32 uniforms_ext_f32_link(object_t *object, material_data_t *mat, char *link) { } f32 scale2d = (900 / (float)base_h()) * g_config->window_scale; if (!decal) { - val *= g_context->paint2d ? 0.55 * scale2d * ui_view2d_pan_scale : 2; + val *= g_context->paint2d ? 0.5 * 0.5 * scale2d * ui_view2d_pan_scale : 2; } else { val *= scale2d; // Projection ratio