Skip to content

Add Metal Gaussian rendering for native viewport and usdview - #107

Merged
snkmcb merged 1 commit into
mainfrom
codex/metal-gaussian-rendering
Sep 27, 2026
Merged

snkmcb merged 1 commit into
mainfrom
codex/metal-gaussian-rendering

Conversation

@snkmcb

@snkmcb snkmcb commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Gaussian-only USD stages opened as an empty view with the Metal backend. Add CPU-sorted Gaussian rendering on Metal so these stages render in the native viewport and usdview. The shared projection, covariance, SH evaluation and sorting implementation now lives in RenderExtraction; Vulkan retains its existing raster path.

Metal draws alpha-blended ellipses against opaque mesh depth and writes resource/particle picking IDs. Immutable prepared buffers are reused across unchanged frames and retained across in-flight edits. Also fix native Hydra regression logging reading an unrequested depth buffer, and enable Objective-C at the top-level macOS configure scope.

Related issue: none.

Impact

  • Areas: Core extraction, Metal, Vulkan build wiring, Hydra, viewport, tests, documentation and GPU capability CI.
  • Adds a backend-neutral Gaussian preparation header to the installed extraction package. No renderer settings or GPU shader ABI changes.
  • Metal preparation/sorting remains CPU-based: prefer falls back, require rejects. Camera/scene changes prepare a new stream; GPU preparation and tile rasterization remain Vulkan-only.
  • Documents the new Metal support and adds Gaussian resource/preparation/raster tests to the Windows self-hosted GPU CI selection.

Verification

Local Apple GPU / Release / OpenUSD 26.08:

  • Eight source/runtime tests passed: Metal Gaussian image/AOV/composition/cache/in-flight tests, existing Metal backend, native USD Gaussian viewport with screenshot/reference/resize/logging, Gaussian preparation/resource, extraction/world, and backend boundaries.
  • Install-tree consumer passed.
  • Hydra discovery, render-buffer and HgiMetal bridge tests passed.
  • A local 5,834,784-particle USD stage rendered successfully in the native Metal viewport and usdview; usdview reported hgi_metal_transfer_mode=gpu-copy and zero validation messages. The user confirmed both displays. Native capture completed three frames successfully. The private scene/image is not included in this PR.
  • git diff --check passed.

Commands used:

cmake --build build/cy2026-macos-arm64-py313-usd--viewport-usd --target merlin-viewport hdMerlin merlin-metal-gaussian-tests merlin-metal-backend-tests merlin-gaussian-preparation-tests -j 6
ctest --test-dir build/cy2026-macos-arm64-py313-usd--viewport-usd -R '^merlin-(metal-(gaussian|backend)|viewport-metal-gaussian|gaussian-(resource|preparation)|render-(world|extraction)|backend-boundaries)$' --output-on-failure
ctest --test-dir build/cy2026-macos-arm64-py313-usd--viewport-usd -R '^merlin-install-consumer$' --output-on-failure
ctest --test-dir build/cy2026-macos-arm64-py313-usd--viewport-usd -R '^merlin-hydra2-(discovery|render-buffer|hgi-metal-bridge)$' --output-on-failure

Windows Vulkan/HgiVulkan cannot be exercised on this Mac. Self-hosted GPU CI passed for commit 7305ec8 in Debug/Release and OpenUSD 26.05/26.08. Hosted Core/Metal/MaterialX CI passed all 12 jobs for the same commit.

Review checklist

  • The change follows the contribution guidelines.
  • Observable behavior has tests.
  • User-facing changes are recorded under Unreleased.
  • Support claims and examples match validated behavior; GPU-driven Metal support is not claimed.

@snkmcb
snkmcb merged commit c9d48e1 into main Sep 27, 2026
16 checks passed
@snkmcb
snkmcb deleted the codex/metal-gaussian-rendering branch September 27, 2026 08:14
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.

1 participant