I’ve been trying to create a wound shader to put on top of my characters head. Using a Custom pass I’ve first used a WriteMask to mask the head pixels and now I’m trying to apply a Lit Shader over it but for some reason this is the result I get:
It’s just an unmodified HDRP Lit Material with a green surface colour but for some reason it has no lighting regardless of culling Front or Back.
Also for extra info this is what it looks like with a Unlit Shader:
So after changing the Pass from ForwardOnly to ‘Forward’ I have gotten a much better result, but mind you with a new issue now; flickering. I’ve attached a GIF of the issue. I feel like I’m so close to getting stencils to work on a HDRP Lit - which has been a way bigger hassle than I ever anticipated.
Shader Tags used in writeMask Shader:
DepthOnlyShaderTags = new ShaderTagId[]
{
new ShaderTagId("DepthOnly"),
new ShaderTagId("DepthForwardOnly"),
};
Shader Tags Used in Lit Shader Pass:
shaderTagsLit = new ShaderTagId[]
{
new ShaderTagId("Forward"),
new ShaderTagId("ForwardOnly"),
new ShaderTagId("SRPDefaultUnlit"),
new ShaderTagId("MotionVectors"),
new ShaderTagId("GBuffer"),
};
It’s to also be noted that the flickering persists even if providing no override Material.