Page MenuHome

Experimental color ID selection
Needs ReviewPublic

Authored by Campbell Barton (campbellbarton) on Mar 13 2017, 5:47 PM.

Details

Summary

This patch is for first-hit selection, storing selection ID's in color.

  • Off screen buffer is used so we can draw RGBA (screen context uses RGB with no alpha channels).
  • Selection caches the the region to avoid multiple buffer reads (for object selection which currently does 3x draws for regular selection).

Proof of concept patch, works with cameras, surfaces, metaballs.

Not meshes or armatures (which change the color).

For this to be properly supported we need:

  • better control of color (currently color is set within draw code fairly often).
  • ability to force shadeless colors.

This patch could be developed in master but changes to shading would cause *many* conflicts with 2.8x,
so postponing the patch for now, uploading here for reference.

Diff Detail

Repository
rB Blender
Branch
TEMP-SELECT-PICK-COLOR
Build Status
Buildable 467
Build 467: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from to Experimental color ID selection.
  • No need for depth buffer struct
source/blender/gpu/intern/gpu_select_id.c
62–95

This block is from gpu_select_pick.c should be de-duplicated before the patch goes into master.