How can I not have custom shader/material rendering in front of "screen space - camera" canvas?

I customized a new unlit shader by changing the color output by frag, added “Blend SrcAlpha OneMinusSrcAlpha” under Pass and “Queue” = “Transparent” under Tags.

The effect looks good when I attached the shader/material to a sprite renderer or a quad, but in both cases, they would seem to render in front of any “screen space - camera” canvas no matter what Order in Layer I set in them and the canvas.

Does this problem have to do with the Render Queue in the material, or is it likely due to something else?

Edit: “Solved” the issue by setting the sprite renderer z position to be higher than 90 which is the fixed z position of the “screen space - camera” canvas.

1 Like

Thank you for the solution. It worked for me.