Trail Rendere Draw On Top Of Trail

The Trail Renderer draws under previously drawn trail. How do I make it draw on top? I have attached pictures of the problem, inspector and material.

Inspector

Material

1 Like

Any idea?

Unfortunately I don’t think it’s easy with the built-in trail renderer (and particle trail renderer).
They both draw the trail from head to tail, so later parts of the trail end up drawing over the earlier parts.

Ideally we would have an option to choose which end to start drawing from… but we don’t :frowning:

One random idea i have is (assuming the trail is writing depth), set the depth test on the material to be Less instead of LessEqual. It would required a custom shader though I think. You could probably copy the standard unlit particle shader you are already using, put it in your project, rename it, and change the ZTest line in the shader file. (Unity - Manual: ShaderLab: Culling & Depth Testing)