Hi!
I have a custom renderer feature which, when executing a pass, has a call like this:
private static void ExecutePass(LayersToTexturesPassData passData, RasterGraphContext context)
{
RasterCommandBuffer cmd = context.cmd;
cmd.ClearRenderTarget(RTClearFlags.ColorDepth, passData.BackgroundColor, 0, 0);
// ...etc
}
As an example, I have passData.BackgroundColor set to (1,0,0,1) (Red).
On Windows (using Direct3D API), I can check the frame debugger to see that the clear color is working correctly:
(not sure why
Clear Color at the bottom is always {1,0,1,1} no matter what I set passData.BackgroundColor to, but it’s clearing to red properly anyway.)
Here’s the exact same pass on macOS (Apple Silicon which can only use Metal API):
On Mac, it’s clearing to black (or probably actually Clear, IE {0,0,0,0}) instead of red.
So… what gives? Why does the color passed into RasterCommandBuffer.ClearRenderTarget go black/zero out on macOS & Metal?
This is Unity 6.0, URP 17.0.4. Thank you! ![]()

