My project makes extensive use of stencils and most shaders I write use HLSL directly, but some are complicated enough that Shadergraph makes more sense. That said, I have yet to find a way to get stencil shader code inside shadergraph, so after I finish authoring my shader, i have to open up the code and manually add:
_StencilComp ("Stencil Comparison", Float) = 3
}
SubShader
Stencil
{
Ref 3
Comp [_StencilComp]
Pass Keep
}
Which does work, but it breaks all the inspector formatting and makes it so if I need to make an adjustment to the shader i need to open the original, make the adjustment, and then readd this code each time.
Is there a way to add this code inside ShaderGraph, or are there plans to in the future?