Build: selection highlight (outline) missing on rigged mesh #170

Closed
opened 2026-09-29 16:27:58 +00:00 by sky_line · 0 comments
Owner

Selecting rigged mesh in edit mode draws no selection highlight: no outline, visible or hidden. Confirmed on actively worn rigged mesh. Not yet checked: rigged mesh that is rezzed in-world (not worn), and animesh.

Cause

LLCleanRendererVK::setSelection (indra/newview/vkgfx/llcleanrenderervk.cpp ~4141) builds the selection draw list on the CPU from each selected instance's mesh slot, and skips rigged instances outright:

if ((in.flags & 1u) != 0u) continue;   // rigged: skinned verts live in the pre-skin output

A rigged instance's drawable vertices only exist in the pre-skin output buffer (mSkinVbo), at a range the GPU cull allocates each frame (rig_dst). The CPU can't know that offset, so the outline pass never drew them.

Fix direction

  • Let the GPU build the rigged part of the selection list. The cull already writes each visible instance's final DrawCmd (with its skinned vertexOffset) to cand[id]. A small compute pass (or a cull flag for selected instances) can copy cand[id] for the selected rigged ids into a GPU selection buffer with a count, drawn with vkCmdDrawIndexedIndirectCount.
  • Draw that list with rigged variants of the selection pipelines: mSkinVbo vertex source, the eye-relative mViewProjRel push (like the lit rigged draws), and the same visible/hidden two-pass outline and colours.
  • Rezzed rigged mesh: check whether it is ingested as rigged (flag 1) or as static geometry. If static, it may already outline correctly, so this is part of the in-world check.
  • Mouselook / own-avatar hiding: follow the main view's mHideSelf behaviour.

Related: #29 (builder views), #101 (Highlight Transparent).

Selecting rigged mesh in edit mode draws no selection highlight: no outline, visible or hidden. Confirmed on **actively worn** rigged mesh. Not yet checked: rigged mesh that is rezzed in-world (not worn), and animesh. ## Cause `LLCleanRendererVK::setSelection` (`indra/newview/vkgfx/llcleanrenderervk.cpp` ~4141) builds the selection draw list on the CPU from each selected instance's mesh slot, and skips rigged instances outright: ``` if ((in.flags & 1u) != 0u) continue; // rigged: skinned verts live in the pre-skin output ``` A rigged instance's drawable vertices only exist in the pre-skin output buffer (`mSkinVbo`), at a range the GPU cull allocates each frame (`rig_dst`). The CPU can't know that offset, so the outline pass never drew them. ## Fix direction - Let the GPU build the rigged part of the selection list. The cull already writes each visible instance's final `DrawCmd` (with its skinned `vertexOffset`) to `cand[id]`. A small compute pass (or a cull flag for selected instances) can copy `cand[id]` for the selected rigged ids into a GPU selection buffer with a count, drawn with `vkCmdDrawIndexedIndirectCount`. - Draw that list with rigged variants of the selection pipelines: `mSkinVbo` vertex source, the eye-relative `mViewProjRel` push (like the lit rigged draws), and the same visible/hidden two-pass outline and colours. - Rezzed rigged mesh: check whether it is ingested as rigged (flag 1) or as static geometry. If static, it may already outline correctly, so this is part of the in-world check. - Mouselook / own-avatar hiding: follow the main view's `mHideSelf` behaviour. Related: #29 (builder views), #101 (Highlight Transparent).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#170
No description provided.