2,307 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
0
answers
71
views
Buffer write operation slowing down Metal shader, despite never executed
I have the following Metal kernel. It does some ALU heavy computations and I want to return selected results back to the Swift based host. I have noticed that the pure presence of the write statement ...
0
votes
0
answers
121
views
Metal shader compilation fails on Xcode 26.1.1 due to missing Metal Toolchain
I am trying to compile some Metal shaders using Xcode 26.1.1 on macOS 26.1, but it fails with this:
error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -...
0
votes
0
answers
98
views
Metal shader fails to compile on macOS 26.1
I’m working on a SwiftUI / Metal project that implements a dynamic multicolor artwork background gradient (similar to Apple Music). The shader is a [[ stitchable ]] Metal function used inside a ...
0
votes
0
answers
90
views
Analyzing performance of metal shaders in Xcode
I'm trying to analyse my metal shaders for potential performance bottlenecks using the "Capture GPU Workload" function in Xcode (see screenshot).
When I select Frame or the device nothing ...
1
vote
0
answers
75
views
How to get pass `wgpu::Buffers` to `CoreML` `predict` as inputs
I am have a wgpu::Buffer. I am trying to create input to a CoreML from this buffer.
let hal_buffer = unsafe { buffer.as_hal::<wgpu::hal::metal::Api>() };
let Some(hal_buffer) = ...
2
votes
0
answers
66
views
How to render drop shadow like figma in Metal shader
I am new to Graphic programming and shaders and I am working on a Metal fragment shader that downscales a video frame by 20% and adds a soft drop shadow around it to create a depth effect. The shadow ...
1
vote
0
answers
61
views
Initializing global constant through function in MSL
How can a constant in Metal Sharding Language (MSL) be initialised through a function?
I've tried the following code but got this error message:
Variable in constant address space must be initialized
...
eztam's user avatar
- 3,871
6
votes
0
answers
131
views
RealityKit how to filter entities in post process
I am implementing a "glow" effect in RealityKit. I followed this open source library which is in SceneKit: https://github.com/laanlabs/SCNTechniqueGlow. The basic idea is to create a "...
1
vote
1
answer
169
views
Unable to render sprites in batches / instances using SDL3 GPU API and Odin. SSBO is not available to shader
I am new to graphics in general, so I am trying to learn from others.
After drawing a triangle, a quad and then a sprite on top, I have been trying to get a batch of them on screen using instancing.
...
3
votes
2
answers
104
views
What does a min filter do on the same mip level?
In a graphics API like Vulkan, you have VkFilter, which can be NEAREST or LINEAR. Leaving aside the mipmap filtering, which is another thing altogether, I'm trying to understand what the point of the ...
1
vote
1
answer
111
views
Non-uniform access by indexing vs non-uniform access from a switch case or if-else statement
This question is supposed to be in the most general sense possible, this is because I'm using the Slang shading language to apply potentially to multiple graphics APIs.
In OpenGL and Vulkan the ...
3
votes
0
answers
1k
views
Unreal Engine 5.6.1 (also 5.8) will not work on macOS 26.0 + Xcode 26.0
When I try to run UE 5.6.1, or UE 5.8 (Built from Source Code), I get the following metal error:
I have tried modifying the Apple_SDK.json and setting the Max versions to 26.0.0 and LLVM versions are ...
3
votes
1
answer
316
views
SwiftUI How to Apply Shader "whatever" is behind the view
I am writing a program that has some images where you can scroll through and I also have a rectangle-like view that is called PixeleteView where I want to pixelate the content behind, it is easy to ...
0
votes
0
answers
45
views
How to update SCNTechnique's uniforms?
After reading the documentation, I thought that having an instance of a SCNTechnique, we can update the uniforms by setting setValue(_, forKey:), but in my case, that's not working out of the box; I ...
0
votes
0
answers
86
views
How to use MTTransitions (MetalPetal) in SwiftUI for image transition? Only .none effect is working
I’m trying to use MTTransitions with SwiftUI to create image transitions using Metal. It works perfectly in UIKit, but when I try to integrate it into SwiftUI using UIViewRepresentable, only the .none ...