Collection

Metal sample architecture

Source-backed, high-level architecture notes for Apple sample-code pages grouped in the Metal folder.

  • Catalog module label: Metal
  • Coverage: 52 / 52 sample pages documented
  • Source policy: archive hashes and extracted-tree references are verified locally before analysis

Samples

Sample Platforms High-level architecture Documented patterns
Accelerating ray tracing and motion blur using Metal iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → ViewController → Renderer → Metal APIs. View-controller organization, Delegate or data-source callbacks
Accelerating ray tracing using Metal iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → ViewController → Renderer → Metal APIs. View-controller organization, Delegate or data-source callbacks
Achieving smooth frame rates with a Metal display link iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample bundle with entry-bearing project variants iOS, macOS, tvOS, each leading to Metal APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Adjusting the level of detail using Metal mesh shaders iOS, iPadOS, Mac Catalyst, macOS A C++, C/Objective-C header, Metal, Objective-C, Objective-C++, Python sample bundle with entry-bearing project variants MeshShadersMetalCPP, metal-cpp, each leading to Metal / MetalKit APIs. Delegate or data-source callbacks, Adapter
Calculating primitive visibility using depth testing iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Capturing Metal commands programmatically macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLCaptureManager → AAPLRenderer → metal_stdlib APIs. Delegate or data-source callbacks
Combining blit and compute operations in a single pass iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → ViewController → Metal4Renderer → Metal / metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Control the ray tracing process using intersection queries iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → ViewController → Renderer → Metal APIs. View-controller organization, Delegate or data-source callbacks
Creating a 3D application with hydra rendering — A C/Objective-C header, Metal, Objective-C++, Python sample with the source-visible chain main → AAPLViewController → AAPLRenderer → MetalKit APIs. Delegate or data-source callbacks
Creating a custom Metal view iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → Metal APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Creating a Metal dynamic library iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLEditViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Creating and sampling textures iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Culling occluded geometry using the visibility result buffer iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. Delegate or data-source callbacks
Customizing a PyTorch operation — A C/Objective-C header, Objective-C++, Python sample with the source-visible chain run_sample → CustomMPSSoftshrinkModel → Metal / metal_stdlib APIs. —
Customizing a TensorFlow operation — A C++, Metal, Python sample with the source-visible chain _hash_encode → TrainMonitor → Metal APIs. —
Customizing render pass setup iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Customizing shaders using function pointers and stitching iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLConfigurationViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Drawing a triangle with Metal 4 iOS, iPadOS, Mac Catalyst, macOS, tvOS A C, C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → ViewController → Metal4Renderer → metal_stdlib APIs. Protocol-oriented abstraction, Delegate or data-source callbacks
Encoding argument buffers on the GPU iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Encoding indirect command buffers on the CPU iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Encoding indirect command buffers on the GPU iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Implementing a multistage image filter using heaps and events iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Implementing a multistage image filter using heaps and fences iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Implementing order-independent transparency with image blocks iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → TransparentFragmentStore → AAPLRenderer → Cocoa / simd APIs. View-controller organization, Delegate or data-source callbacks, Central store
Improving edge-rendering quality with multisample antialiasing (MSAA) iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Loading textures and models using Metal fast resource loading macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLViewController → AAPLRenderer → MetalKit / Metal APIs. View-controller organization, Delegate or data-source callbacks
Managing groups of resources with argument buffers iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLViewController → AAPLRenderer → MetalKit APIs. View-controller organization, Delegate or data-source callbacks
Migrating OpenGL code to Metal iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLMetalViewController → AAPLMetalRenderer → simd / OpenGLES APIs. View-controller organization, Delegate or data-source callbacks
Mixing Metal and OpenGL rendering in a view iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLMetalViewController → AAPLMetalRenderer → OpenGLES / simd APIs. View-controller organization, Delegate or data-source callbacks
Modern rendering with Metal iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLCameraController → AAPLTextureManager → AAPLMeshRenderer → Metal APIs. View-controller organization, Delegate or data-source callbacks
Performing calculations on a GPU macOS A C/Objective-C header, Metal, Objective-C sample centered on main, with direct use of Metal, metal_stdlib. —
Processing HDR images with Metal iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLWindowController → AAPLRenderer → MetalKit APIs. View-controller organization, Delegate or data-source callbacks
Reading pixel data from a drawable texture iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → MetalKit APIs. View-controller organization, Delegate or data-source callbacks
Rendering a curve primitive in a ray tracing scene iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → ViewController → Renderer → Metal APIs. View-controller organization, Delegate or data-source callbacks
Rendering a scene with deferred lighting in C++ iOS, iPadOS, Mac Catalyst, macOS, tvOS A C++, C/Objective-C header, Metal, Objective-C, Objective-C++, Python sample bundle with entry-bearing project variants Application, metal-cpp, each leading to Metal / metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks, Adapter
Rendering a scene with deferred lighting in Objective-C iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLBufferExaminationManager → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Rendering a scene with deferred lighting in Swift iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Swift sample with the source-visible chain AppDelegate → ViewController → Renderer → MetalKit / metal_stdlib APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Rendering a scene with forward plus lighting using tile shaders iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Rendering reflections in real time using ray tracing iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → MetalKit APIs. View-controller organization, Delegate or data-source callbacks
Rendering reflections with fewer render passes iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLViewController → AAPLRenderer → MetalKit APIs. View-controller organization, Delegate or data-source callbacks
Rendering terrain dynamically with argument buffers iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLGameViewController → AAPLDebugRenderer → metal_stdlib / Metal APIs. View-controller organization, Delegate or data-source callbacks
Running a machine learning model on the GPU timeline macOS A C/Objective-C header, Objective-C sample centered on main, with direct use of Metal. —
Running inline ML operations in a shader with Metal 4 macOS A C/Objective-C header, Metal, Objective-C sample centered on main, with direct use of Metal, MetalPerformancePrimitives, metal_stdlib. —
Selecting device objects for compute processing macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib / Metal APIs. Delegate or data-source callbacks
Selecting device objects for graphics rendering macOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. Delegate or data-source callbacks
Streaming large images with Metal sparse textures iOS, iPadOS, Mac Catalyst, macOS A C/Objective-C header, Metal, Objective-C, Objective-C++ sample with the source-visible chain main → AAPLViewController → AAPLRenderer → Metal APIs. View-controller organization, Delegate or data-source callbacks
Supporting Simulator in a Metal app iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C, Swift sample bundle with entry-bearing project variants Objective-C, Swift, each leading to MetalKit APIs. View-controller organization, Delegate or data-source callbacks
Synchronizing CPU and GPU work iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Training a neural network to render irradiance in real time macOS A C/Objective-C header, Metal, Objective-C, Python sample with the source-visible chain main → ViewController → Renderer → MetalKit / metal_stdlib APIs. Protocol-oriented abstraction, Delegate or data-source callbacks
Using argument buffers with resource heaps iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Using function specialization to build pipeline variants iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Metal, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → metal_stdlib APIs. View-controller organization, Delegate or data-source callbacks
Using Metal to draw a view’s contents iOS, iPadOS, Mac Catalyst, macOS, tvOS A C/Objective-C header, Objective-C sample with the source-visible chain main → AAPLViewController → AAPLRenderer → UIKit / Cocoa APIs. View-controller organization, Delegate or data-source callbacks

Cross-sample signals

Recurring documented patterns

Pattern label Sample documents
Delegate or data-source callbacks 47
View-controller organization 39
Protocol-oriented abstraction 7
Adapter 2

Type-role naming evidence

Counts below are declaration-name suffixes, not inferred patterns.

Role suffix Distinct declarations across samples
Delegate 89
Renderer 57
Controller 55
View 10
Scene 6
Manager 4
Loader 2
Adapter 2
Model 2
Monitor 1
Store 1

Swift access-control evidence

These are declaration occurrences in scanned Swift source, including implicit internal declarations.

Access level Occurrences
implicit internal 480
private 15
fileprivate 1
public 1

References

Generated from the verified local catalog and completed Markdown documents.