Skip to content

Conversation

@tarcila
Copy link
Collaborator

@tarcila tarcila commented Feb 9, 2026

  • Nearest neighbour interpolation for NanoVDB volumes
  • Volume gradient/normal computation across all spatial field types for shading support
  • MDL fix for texture resource null-pointer dereference and uninitialized memory access
  • Infinite accumulation when unitDistance is 0 in transfer function volumes
  • Unused maxRayDepth from default/directLight renderer JSON

@tarcila tarcila requested a review from Copilot February 9, 2026 02:06
Copy link
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

Improves volume rendering correctness and shading by adding gradient/normal support to spatial field sampling, introducing NanoVDB nearest-neighbor filtering, and fixing a few robustness issues (MDL sampler lifetime, unitDistance edge cases, renderer JSON cleanup).

Changes:

  • Add optional gradient output to volume samplers and use it to compute world-space volume normals for the normal AOV.
  • Add NanoVDB nearest/linear filtering selection and plumb it through GPU data + PTX samplers.
  • Fix null/uninitialized MDL sampler handling; avoid division-by-zero/infinite accumulation for unitDistance.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
devices/rtx/libmdl/types.h Initialize TextureDescriptor::knownIndex to avoid uninitialized reads.
devices/rtx/device/volume/TransferFunction1D.cpp Clamp oneOverUnitDistance defensively; add warning for invalid unitDistance.
devices/rtx/device/visrtx_device.json Remove unused maxRayDepth renderer parameter from schema.
devices/rtx/device/spatial_field/StructuredRegularSampler_ptx.cu Add optional gradient computation via central differences.
devices/rtx/device/spatial_field/StructuredRectilinearSampler_ptx.cu Refactor sampling helper and add gradient computation.
devices/rtx/device/spatial_field/NvdbRegularSampler_ptx.cu Add nearest/linear sampling and optional gradients; adjust index mapping.
devices/rtx/device/spatial_field/NvdbRegularField.cpp Plumb NanoVDB filter choice into GPU data.
devices/rtx/device/spatial_field/NvdbRectilinearSampler_ptx.cu Add nearest/linear sampling and optional gradients.
devices/rtx/device/spatial_field/NvdbRectilinearField.cpp Plumb NanoVDB filter choice into GPU data.
devices/rtx/device/material/MDL.h Default-initialize sampler descriptor members to safe values.
devices/rtx/device/material/MDL.cpp Guard against null samplers and warn on failed default texture acquisition.
devices/rtx/device/gpu/volumeIntegration.h Add sample-with-gradient path; compute volume normals at first contribution depth.
devices/rtx/device/gpu/shadingState.h Extend NanoVDB sampler state to support nearest/linear samplers + filter flag.
devices/rtx/device/gpu/renderer/raygen_helpers.h Accumulate volume normals from gradients; normalize material normals before accumulation.
devices/rtx/device/gpu/populateHit.h Populate VolumeHit transform matrices from OptiX instance handle.
devices/rtx/device/gpu/gpu_objects.h Introduce SpatialFieldFilter and store it in NanoVDB GPU data.
devices/rtx/device/gpu/gpu_math.h Add worldToObject/objectToWorld matrices to VolumeHit.

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

@tarcila tarcila force-pushed the more-rendering-fixes branch 2 times, most recently from d1c595e to b1903b5 Compare February 9, 2026 02:22
@tarcila tarcila force-pushed the more-rendering-fixes branch 2 times, most recently from 2ccb229 to 52bcb98 Compare February 9, 2026 13:13
@tarcila tarcila force-pushed the more-rendering-fixes branch from 52bcb98 to e713fda Compare February 9, 2026 13:17
@tarcila tarcila requested a review from jeffamstutz February 9, 2026 13:23
@jeffamstutz
Copy link
Collaborator

LGTM, thanks!

@jeffamstutz jeffamstutz merged commit 0c0a413 into NVIDIA:next_release Feb 9, 2026
9 checks passed
@tarcila tarcila deleted the more-rendering-fixes branch February 9, 2026 15:08
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