DRW: Selection: Extend small object selection workaround to all overlays
Fix T77015 box select doesnt select cameras when zoomed out, lasso and circle select do work.
This commit is contained in:
parent
4a9a8611f2
commit
39aa122a0e
Notes:
blender-bot
2023-02-14 10:21:15 +01:00
Referenced by issue #77335, Circle Select tool selects faces perpendicular to the view. Referenced by issue #77130, Visually broken/stepped wireframe in object mode (regression) Referenced by issue #77015, box select doesnt select cameras when zoomed out, lasso and circle select do work.
|
@ -221,6 +221,11 @@ void main()
|
|||
/* Convert to screen position [0..sizeVp]. */
|
||||
edgePos = edgeStart = ((gl_Position.xy / gl_Position.w) * 0.5 + 0.5) * sizeViewport.xy;
|
||||
|
||||
/* HACK: to avoid loosing sub pixel object in selections, we add a bit of randomness to the
|
||||
* wire to at least create one fragment that will pass the occlusion query. */
|
||||
/* TODO(fclem) Limit this workaround to selection. It's not very noticeable but still... */
|
||||
gl_Position.xy += sizeViewportInv.xy * gl_Position.w * ((gl_VertexID % 2 == 0) ? -1.0 : 1.0);
|
||||
|
||||
#ifdef USE_WORLD_CLIP_PLANES
|
||||
world_clip_planes_calc_clip_distance(world_pos);
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,11 @@ void main()
|
|||
vec3 world_pos = point_object_to_world(pos);
|
||||
gl_Position = point_world_to_ndc(world_pos);
|
||||
|
||||
/* HACK: to avoid loosing sub pixel object in selections, we add a bit of randomness to the
|
||||
* wire to at least create one fragment that will pass the occlusion query. */
|
||||
/* TODO(fclem) Limit this workaround to selection. It's not very noticeable but still... */
|
||||
gl_Position.xy += sizeViewportInv.xy * gl_Position.w * ((gl_VertexID % 2 == 0) ? -1.0 : 1.0);
|
||||
|
||||
stipple_coord = stipple_start = screen_position(gl_Position);
|
||||
|
||||
#ifdef OBJECT_WIRE
|
||||
|
|
Loading…
Reference in New Issue