diff options
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/edit_curve_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 12 | ||||
-rw-r--r-- | source/blender/draw/modes/shaders/common_globals_lib.glsl | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/shaders/common_hair_lib.glsl | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c index e3c120e80cb..e68e03c2438 100644 --- a/source/blender/draw/modes/edit_curve_mode.c +++ b/source/blender/draw/modes/edit_curve_mode.c @@ -335,7 +335,7 @@ static void EDIT_CURVE_draw_scene(void *vedata) MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl); } - /* Thoses passes don't write to depth and are AA'ed using other tricks. */ + /* These passes don't write to depth and are AA'ed using other tricks. */ DRW_draw_pass(psl->overlay_edge_pass); DRW_draw_pass(psl->overlay_vert_pass); } diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 272aa552d38..f0e35e47a66 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -371,7 +371,7 @@ static void edit_mesh_create_overlay_passes(float face_alpha, DRW_shgroup_state_enable(grp, DRW_STATE_CLIP_PLANES); } - /* Cage geom needs to be offseted to avoid Z-fighting. */ + /* Cage geom needs to be offsetted to avoid Z-fighting. */ passes->faces_cage = DRW_pass_create("Edit Mesh Faces Cage", DRW_STATE_WRITE_COLOR | statemod); grp = shgrps->faces_cage = DRW_shgroup_create(face_sh, passes->faces_cage); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 9fc11e4f36f..148a4951dc6 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1242,7 +1242,7 @@ static void DRW_shgroup_camera_background_images(OBJECT_Shaders *sh_data, unit_m4(win_m4_scale); unit_m4(win_m4_translate); unit_m4(scale_m4); - axis_angle_to_mat4_single(rot_m4, 'Z', bgpic->rotation); + axis_angle_to_mat4_single(rot_m4, 'Z', -bgpic->rotation); unit_m4(translate_m4); const float *size = DRW_viewport_size_get(); @@ -1256,7 +1256,7 @@ static void DRW_shgroup_camera_background_images(OBJECT_Shaders *sh_data, if (!DRW_state_is_image_render()) { rctf render_border; - ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &render_border, true); + ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &render_border, false); camera_width = render_border.xmax - render_border.xmin; camera_height = render_border.ymax - render_border.ymin; camera_aspect = camera_width / camera_height; @@ -1311,9 +1311,9 @@ static void DRW_shgroup_camera_background_images(OBJECT_Shaders *sh_data, scale_m4[0][0] = scale_x; scale_m4[1][1] = scale_y; - // translate - translate_m4[3][0] = bgpic->offset[0]; - translate_m4[3][1] = bgpic->offset[1]; + /* Translate, using coordinates that aren't squashed by the aspect. */ + translate_m4[3][0] = bgpic->offset[0] * 2.0f * max_ff(1.0f, 1.0f / camera_aspect); + translate_m4[3][1] = bgpic->offset[1] * 2.0f * max_ff(1.0f, camera_aspect); mul_m4_series(bg_data->transform_mat, win_m4_translate, @@ -2862,7 +2862,7 @@ static void DRW_shgroup_lightprobe(OBJECT_Shaders *sh_data, DRWCallBuffer *buf = buffer_theme_id_to_probe_cube_outline_shgrp( stl, theme_id, ob->base_flag); - /* TODO remove or change the drawing of the cube probes. Theses line draws nothing on purpose + /* TODO remove or change the drawing of the cube probes. This line draws nothing on purpose * to keep the call ids correct. */ zero_m4(probe_cube_mat); DRW_buffer_add_entry(buf, call_id, &draw_size, probe_cube_mat); diff --git a/source/blender/draw/modes/shaders/common_globals_lib.glsl b/source/blender/draw/modes/shaders/common_globals_lib.glsl index 3cc6ac9a5a4..f75ef06b6d9 100644 --- a/source/blender/draw/modes/shaders/common_globals_lib.glsl +++ b/source/blender/draw/modes/shaders/common_globals_lib.glsl @@ -83,7 +83,7 @@ layout(std140) uniform globalsBlock float pad_globalsBlock; }; -/* data[0] (1nd byte flags) */ +/* data[0] (1st byte flags) */ #define FACE_ACTIVE (1 << 0) #define FACE_SELECTED (1 << 1) #define FACE_FREESTYLE (1 << 2) diff --git a/source/blender/draw/modes/shaders/common_hair_lib.glsl b/source/blender/draw/modes/shaders/common_hair_lib.glsl index f9c3df34658..cbcdc947bc7 100644 --- a/source/blender/draw/modes/shaders/common_hair_lib.glsl +++ b/source/blender/draw/modes/shaders/common_hair_lib.glsl @@ -1,8 +1,8 @@ /** * Library to create hairs dynamically from control points. * This is less bandwidth intensive than fetching the vertex attributes - * but does more ALU work per vertex. This also reduce the number - * of data the CPU has to precompute and transfert for each update. + * but does more ALU work per vertex. This also reduces the amount + * of data the CPU has to precompute and transfer for each update. */ /** @@ -44,7 +44,7 @@ uniform usamplerBuffer hairStrandSegBuffer; /* R16UI */ /* -- Subdivision stage -- */ /** * We use a transform feedback to preprocess the strands and add more subdivision to it. - * For the moment theses are simple smooth interpolation but one could hope to see the full + * For the moment these are simple smooth interpolation but one could hope to see the full * children particle modifiers being evaluated at this stage. * * If no more subdivision is needed, we can skip this step. |