Standard shader as overlay

Hey,

Is there a fast way to make a variant of the standard shader that is set to Overlay rendering?

Thanks!

Little bump on this - just would like a variant of the standard that overlays. I’ve downloaded the native shader pack and imported it but what do I need to duplicate and change?

Overlays as in is rendered after EVERYTHING else?
What about a second camera? If it’s in the main camera it’s very likely still going to be before any post-process effects and GUI.
If your ok with it being before post-processes (At least I think even RenderQue 4000 is before post-processes, then use either the first or as I’d suggest the second answer in this thread: Rendering Order - Questions & Answers - Unity Discussions )
(Second one is about setting it per material instead of having to use a new renderer. With unity 5 you might even be able to set it per renderer!)

Yes I would like to render over everything else. Second Camera isn’t an option unfortunately as I’m developing for GearVR and there are issues there. I assumed I would be updating the render queue to 4000 but I’m just not sure where when it comes to the standard shader!?

No need to modify the shader, you can set Material.renderQueue instead.
You would need to set that from a script. (Or possibly a modified material editor)

1 Like

Oh right, cool! Was completely unaware of that - that’s awesome.

And yes, it works! Fantastic, thanks for the help, just saved me creating tons of unnecessary duplicate shaders!

You almost never need to create a new shader, the tricks have simply been hidden away! (Not documented, and I’m still not sure if they are)
Such as the ability to set Blend Mode, Stencil, ZWrite !

2 Likes

Nice, thanks @Zicander ! Wish I had found this before I made a bunch of special shaders :slight_smile: