diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-26 09:10:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-26 09:24:21 +0300 |
commit | 0cb5eae9d0617abedf745753c23061ddfcfd1416 (patch) | |
tree | 46b2ad52af77c2c793ff4d61a02ead693541d198 /source/blender/blenkernel | |
parent | 1758dcd42316448fec7609263ec32a26d8bc0673 (diff) |
Gizmo: optimize intersection tests, fix selection bias
Use more efficient logic for detecting when gizmos are under the cursor.
Even though this isn't a bottleneck, it runs on cursor motion in the
3D viewport, so avoiding any lag here is beneficial.
The common case for cursor motion without any gizmos was always
drawing two passes (one small, then again if nothing was found).
Now a single draw call at the larger size is used.
In isolation this gives around 1.2x-1.4x speedup.
When there are multiple gizmos a depth-buffer picking is used
(similar to object / bone selection) which is more involved but
still only performs 2x draw calls since the result is cached for reuse.
See note in gizmo_find_intersected_3d for a more detailed explanation.
Also restore the depth values in the selection result as they're
needed for gizmos to use selection bias.
Broken since support for GL_SELECT was removed.
Diffstat (limited to 'source/blender/blenkernel')
0 files changed, 0 insertions, 0 deletions