add primitive outlining image pass for image-based wireframe rendering#286
Merged
jeffamstutz merged 1 commit intonext_releasefrom Apr 24, 2026
Merged
add primitive outlining image pass for image-based wireframe rendering#286jeffamstutz merged 1 commit intonext_releasefrom
jeffamstutz merged 1 commit intonext_releasefrom
Conversation
Contributor
There was a problem hiding this comment.
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
PrimitiveOutlineRenderPassand wires it into the renderingImagePipeline. - 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 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); |
There was a problem hiding this comment.
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.
e6c54aa to
1dfc392
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.