Introduce outline render passes and shader.

Use the jump flood algorithm to render an outline around selected
objects. This requires using custom post-processing shaders and
render passes which is managed by a new "Outliner" class.

PiperOrigin-RevId: 929212147
Change-Id: Ie6f475c7c677df7b0d4fc030a8e9520ff9dd03af
This commit is contained in:
Haroon Qureshi
2026-06-09 08:31:11 -07:00
committed by Copybara-Service
parent e6e5229126
commit b083ae487e
16 changed files with 726 additions and 30 deletions
@@ -185,6 +185,12 @@ static void UpdateGeomMaterial(mjrfRenderable* renderable, const mjvGeom& geom,
material.segmentation_id = geom.segid;
// Assume an emissive object is a selected object.
if (geom.emission > 0 && geom.emission == model->vis.global.glow) {
material.selected = true;
material.emissive = 0.0f;
}
// UvScale only applies to objects that don't have explicit UV coordinates
// in their vertex buffer. Instead, we set the UV coordinate to be the same
// as the vertex position.