Skip to content

add primitive outlining image pass for image-based wireframe rendering#286

Merged
jeffamstutz merged 1 commit intonext_releasefrom
wireframeing
Apr 24, 2026
Merged

add primitive outlining image pass for image-based wireframe rendering#286
jeffamstutz merged 1 commit intonext_releasefrom
wireframeing

Conversation

@jeffamstutz
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new post-processing image pass to outline per-primitive boundaries (using objectId+primitiveId) for image-based wireframe rendering, with UI controls that are gated on ANARI primitive-id support.

Changes:

  • Introduces PrimitiveOutlineRenderPass and wires it into the rendering ImagePipeline.
  • Adds viewport UI + settings persistence for “Outline Primitives”, and enables required ID/primitive-id channels only when needed.
  • Extends CPU/CUDA outline algorithms with outlinePrimitives().

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tsd/src/tsd/ui/imgui/windows/Viewport.h Adds state and pass pointer for primitive outlining and device capability flag.
tsd/src/tsd/ui/imgui/windows/Viewport.cpp Detects primitive-id support, adds UI toggle, persists setting, and enables/disables primitive outline pass + required channels.
tsd/src/tsd/rendering/pipeline/passes/PrimitiveOutlineRenderPass.h Declares new image pass for primitive outlining with configurable color/thickness.
tsd/src/tsd/rendering/pipeline/passes/PrimitiveOutlineRenderPass.cpp Implements CPU/CUDA dispatch for outlining primitives based on object/primitive IDs.
tsd/src/tsd/rendering/pipeline/ImagePipeline.h Exposes the new pass in pipeline includes.
tsd/src/tsd/rendering/CMakeLists.txt Adds new pass source and CUDA language properties when CUDA is enabled.
tsd/src/tsd/algorithms/cuda/outline.hpp Declares CUDA outlinePrimitives() overloads.
tsd/src/tsd/algorithms/cuda/outline.cu Implements CUDA primitive outlining and refactors shading to accept outline color.
tsd/src/tsd/algorithms/cpu/outline.hpp Declares CPU outlinePrimitives().
tsd/src/tsd/algorithms/cpu/outline.cpp Implements CPU primitive outlining and refactors shading to accept outline color.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tsd/src/tsd/ui/imgui/windows/Viewport.cpp Outdated
Comment on lines 296 to 300
root["showOnlySelected"].getValue(ANARI_BOOL, &m_showOnlySelected);
root["highlightSelection"].getValue(ANARI_BOOL, &m_highlightSelection);
root["outlinePrimitives"].getValue(ANARI_BOOL, &m_outlinePrimitives);
root["showOnlySelected"].getValue(ANARI_BOOL, &m_showOnlySelected);
int aovType = static_cast<int>(m_visualizeAOV);
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

showOnlySelected is loaded from the settings node twice (lines 296 and 299). This duplicated read is unnecessary and makes it harder to reason about configuration precedence; remove the duplicate call.

Copilot uses AI. Check for mistakes.
Comment thread tsd/src/tsd/algorithms/cuda/outline.cu Outdated
Comment thread tsd/src/tsd/algorithms/cuda/outline.cu Outdated
Comment thread tsd/src/tsd/algorithms/cpu/outline.cpp
@jeffamstutz jeffamstutz merged commit bcafc5a into next_release Apr 24, 2026
12 checks passed
@jeffamstutz jeffamstutz deleted the wireframeing branch April 24, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants