diff options
author | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:12 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:12 +0300 |
commit | 00dcfdf916c69672210b006e62d966f1bc2fbeb7 (patch) | |
tree | 0cbb1b91fe26c750197126085b74224a795a103c /source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c | |
parent | a39532670f6b668da7be5810fb1f844b82feeba3 (diff) | |
parent | d5934974219135102f364f57c45a8b1465e2b8d9 (diff) |
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c')
-rw-r--r-- | source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c index 11309402220..6eac235a191 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c @@ -177,6 +177,7 @@ static void button2d_draw_intern(const bContext *C, GPU_matrix_push(); GPU_matrix_mul(matrix_final); + float screen_scale = 200.0f; if (is_3d) { RegionView3D *rv3d = CTX_wm_region_view3d(C); float matrix_align[4][4]; @@ -187,8 +188,9 @@ static void button2d_draw_intern(const bContext *C, transpose_m4(matrix_align); GPU_matrix_mul(matrix_align); } - - const float screen_scale = mat4_to_scale(matrix_final); + else { + screen_scale = mat4_to_scale(matrix_final); + } if (select) { BLI_assert(is_3d); @@ -215,7 +217,7 @@ static void button2d_draw_intern(const bContext *C, GPU_batch_uniform_1f(button->shape_batch[i], "lineWidth", gz->line_width * U.pixelsize); } else { - GPU_batch_program_set_builtin(button->shape_batch[i], GPU_SHADER_2D_UNIFORM_COLOR); + GPU_batch_program_set_builtin(button->shape_batch[i], GPU_SHADER_3D_UNIFORM_COLOR); } /* Invert line color for wire. */ |