I have a sprite that is animated by a Shader. When I disable the Shader it goes behind the UI.
There’s a screenshot below displaying the problem
I have a sprite that is animated by a Shader. When I disable the Shader it goes behind the UI.
There’s a screenshot below displaying the problem
Is this an orthographic project? It looks 3D to me, and I think you’re having z-axis issues.
My game is 2D and my camera is set to orthographic. The sprites don’t go in front of the UI when I set the canvas to overlay instead of camera but I want the post-processing to apply to the UI.
On your UI game object there should be a canvas component. In the canvas component there is a sorting order option.

I’d say crank that up all the way so when it renders out, it renders above any other sprites that share the same z axis.
The way Unity treats 2D is that everything is on 0 on the z axis so if there are overlapping sprites or in your case UI camera overlay, they will both be trying to render above.
I put the sort order to max but it doesn’t work.

Hrmm It’s hard to say without seeing the project properly. Is the sprite’s sorting order being changed via shader or a script or anything?
The sprites order in layer is always -14. It seems that when ever I remove the shader the sprite using it goes behind the UI. Here’s the Shader

I found a way to solve this problem ![]()
You should share the solution
Please
Please don’t necro posts with useless one-word replies. If you have a question, start a new post, it’s FREE.
When you post you must learn to communicate.
How to report your problem productively in the Unity3D forums:
This is the bare minimum of information to report:
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: https://discussions.unity.com/t/481379