[Shader graph] draw object on top
I would like a mesh to be visible through walls and stuff. Changing the shader queue doesn't seem to do anything no matter how low or high I set it. Is there a way to do it in the shader graph or in any way other than with layered cameras (since that doesn't work with lwrp and hdrp)? I'm using lightweight rp and Unity 2019.2.0a14.
Answer by Riyko174 · Jun 05, 2019 at 12:59 PM
I was working on an fps in LWRP and needed to layer the player weapons over everything else, so this might be the solution you need. You'll have to create a custom forward renderer, Brackeys have a video on how to to that: Brackeys Custom Forward Renderer
Once you have that set up you'll need to create some renderer features to suit what you need. To get my player weapons rendering infront of everything else i used two features with depth settings in the image. I'm basically rendering anything of the player layer thats behind another object like terrain etc on top of everything with the Player Far settings, then the Player Near settings take anything on the player layer thats infront of terrain etc and renders that ontop again
Answer by ristetutureski · Jan 12, 2021 at 04:24 PM
For HDRP, we needed a similar solution where we can render objects on top of everything when they are in Examine mode and/or Inventory mode, have a possibility to rotate the object, prevent clipping with other objects, and all this to be achieved without a second camera. We did it by using Custom Passes. Please find this link where we wrote the blog for it: https://www.intetic.com/blogs/unity-hdrp-render-object-on-top-of-everything/
Hope this solution will help someone with similar needs.
Your answer
Follow this Question
Related Questions
How to access shader graph property values through C# script? 0 Answers
Is it possible to blend 2 different materials via the shader graph? 0 Answers
Is it possible to apply a dissolve shader created with shader graph to a UI button? 0 Answers
LWRP - Vertex displacement and intersection shader shows artefacts 1 Answer
Shadows on alpha clipping/vertex offset shaders misaligned when using screen space texture 0 Answers