Add infinite Mandelbulb zoom pattern - #6
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Infinite Mandelbulb Zoom” visual pattern to the renderer stack, including its Metal ray-marching shader and UI controls for tuning zoom behavior and quality, plus an authorization step before starting world tracking.
Changes:
- Introduces
InfiniteMandelbulbZoomRenderer+ CPU/GPU uniform types and a new Metal shader (InfiniteMandelbulbZoomShaders.metal). - Extends the shared simulation context and the pattern menu model/coordinator to expose infinite-zoom rate, direction, and quality.
- Registers the new pattern and requests World Tracking authorization before starting the
ARSession.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vr-dive/Renderer/RendererTypes.swift | Extends PatternSimulationContext with infinite-zoom controls passed to patterns. |
| vr-dive/Renderer/Renderer.swift | Requests world-tracking authorization before arSession.run, passes new simulation fields, registers the new pattern controller. |
| vr-dive/Renderer/PatternSelection.swift | Adds new pattern kind, adds coordinator/menu model state for infinite zoom, and sets it as the default selection. |
| vr-dive/Demos/InfiniteMandelbulbZoom/InfiniteMandelbulbZoomTypes.swift | Defines Swift-side uniform structs for the Mandelbulb zoom renderer/shader contract. |
| vr-dive/Demos/InfiniteMandelbulbZoom/InfiniteMandelbulbZoomShaders.metal | Implements the Metal vertex/fragment shader for the infinite Mandelbulb zoom ray marcher. |
| vr-dive/Demos/InfiniteMandelbulbZoom/InfiniteMandelbulbZoomRenderer.swift | Implements the new VisualPatternController that drives zoom rebasing and encodes the fullscreen render pass. |
| vr-dive/ContentView.swift | Adds pattern-panel UI controls (rate, direction toggle, quality picker) for Infinite Mandelbulb Zoom. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
602
to
604
| private let queue = DispatchQueue(label: "vr-dive.pattern.coordinator", attributes: .concurrent) | ||
| private var _current: VisualPatternKind = .lunarSurface | ||
| private var _current: VisualPatternKind = .infiniteMandelbulbZoom | ||
| private var _isPaused: Bool = false |
Comment on lines
+148
to
+152
| let requiredAuthorizations = WorldTrackingProvider.requiredAuthorizations | ||
| let authorization = await arSession.requestAuthorization(for: requiredAuthorizations) | ||
| let denied = authorization.filter { $0.value != .allowed } | ||
| guard denied.isEmpty else { | ||
| print("[Renderer] World tracking authorization was not granted: \(authorization)") |
Contributor
Author
There was a problem hiding this comment.
Fixed in follow-up PR #7: the render thread now starts only after World Tracking authorization is granted and arSession.run([worldTracking]) succeeds. The default pattern change was intentionally left untouched.
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.
Summary
Validation
This branch is based on the merged origin/main, so the previous DynamicBox PR changes are not duplicated.