How can I get particles to draw in front of game objects?
I have a dust storm particle that renders in my Unity game. For some reason, it will not draw the particles in front of other game objects. I've tried changing the layers and sorting method, still doesn't work.
Attached is an imgur gif of the anomaly, what is seen in the editor is also seen in the game.
[1]: https://imgur.com/a/LbArKRX
Answer by ifurkend · Jan 29, 2021 at 03:49 PM
This involves customizing your own shader and change the line of "ZTest LEqual" to "ZTest Always".
If you are using URP, just create a simple unlit transparent shader graph (you need to add a Vertex Color node and connect it to the color/alpha inputs of the master node, so the material color can be controlled by the particle system). Right click the master node and view generated code, edit ZTest as mentioned earlier and save it.
After a ton of testing, I realized that the table shader was set to "$$anonymous$$obile Vertex Unlit" and the particle shader was not of a mobile type. After setting both shaders to the mobile variety, it renders correctly.
Your answer
Follow this Question
Related Questions
Line billboard (similar to line renderer) in VFX Graph 0 Answers
Sprites behind Background 0 Answers
Particle System rendered in the camera view 2 Answers
Particles behind mesh appearing in front 0 Answers
How do you use emission.rate? 2 Answers