HDRP SpriteRenderer + Volumetric Fog shader
So i'm making a game in 3d space HDRP with volumetric fog and such.
I was trying to incorporate some bilboarding sprites into it and it seems it may look how i would want it, except for volumetric fog that is being rendered "through sprites" I tried writing to a depth buffer in custom pass of the sprite shader, tried changing it's tags, ZWrite On.
None of it fixes the core problemalt text It seems like the sprite is no written into depth buffer after all.
Is there a way to overcome this?
Answer by czlowiekkanapa · Nov 19, 2021 at 01:41 PM
So the right answer is that when in HDRP ZWrite and other flags do not handle Z-Buffer writing correctly and it just doesn't work.
On the other hand You can create a ShaderGraph (generic alpha cutout template) and Create main texture reference by the name "_MainTex" so that it could work with spriteRenderer.
Not sure why it wasn't doing it before but it does handle fog properly now.
Your answer
Follow this Question
Related Questions
How can I cast shadows onto sprites? 0 Answers
Sprite does not appear when using Color property in Shader graph (Sprite Lit Master Graph) 0 Answers
Stencil Buffer not working with SpriteMask 0 Answers
Get a Color from the Sprite Renderer in the Shader Graph using a Vector Sprite. Unity 2019.4.0f1. 1 Answer
How to change RGB without changing alpha in sprite frag shader? 1 Answer