Hello Everyone.
I am experimenting on using 2D sprites in HDRP, trying to create a 2D/HD vibe.
For my character sprites I would like to have two passes. One lit and one unlit. The unlit pass would be for parts of the character that glow and must always be bright regardless of the lighting. Think glowing eyes or light sabers, that sort of stuff. My problem is I didn’t find a good way to do it.
I thought of putting two sprites atop of each others, one with the lit material and one with the unlit material. But this is clumsy, especially since I use vertex shaders to rotate the sprites.
If I was using URP or my own scriptable pipeline I would have created a shader with two pass, one lit and one unlit. I would have put a LightMode tag on the unlit pass and I would have added a custom pass to the pipeline to render this pass. But I don’t know if the same is possible with HDRP.
According to the documentation the only supported way to create custom shaders for HDRP is to use the shader graph. I couldn’t find any example of custom HDRP shaders written in HLSL. And, as far as I know, there is no way to create multi pass materials with the shader graph, nor it is possible to add a LightMode tag.
So I’m at a loss here. How would you do it?
Thank you very much.