Phase 4 updates

Phase 4 · Slice 21 ·

The editor: grid and handles behind objects, box selection

  • The Scene view's grid and handles are drawn on the GPU against the scene's depth, not painted over the image: objects in front hide the grid, and the parts of a handle behind something show faint (still whole to see and grab; Unity draws handles over everything). The renderer's depth buffer can be copied (Renderer::depth_texture); the editor keeps the engine's image and depth from the last render and, each frame, copies the image and draws the overlay over it, so a handle lighting up on hover costs no new render. The overlay's points take their depth from the render's own projection (a hair nearer, so the grid on a floor shows), and the camera's near plane is the render's.
  • Box selection: dragging from empty space with the left button draws a box; letting go selects the objects whose position is inside and those the scene shows in it (picked at points across the box). Shift or Ctrl adds to the selection; Alt+drag still orbits, and a drag on a handle still moves.
  • Tests: a box around two of three objects selects those two, Shift adds the third, a box without it replaces the selection (kittest). Checked in a screenshot of the Coin Dash level: the grid stops at the level, the move handle's X arrow is faint where it runs inside the wall.
  • Not yet: placed copies inside an instance; box selection by objects' bounds rather than their positions and picks.