I know how how to share custom lighting between Surfaces shaders with a .cginc file. I’m wondering, is there a way to share surf function code as well?
My ultimate goal is to have multiple Surface shaders that share as much code as possible, with the only difference being how things like alpha blending / alpha cutout / culling are handled.
While it appears to be straightforward to share vert and frag functions, my thought was to avoid fragment shaders because I want my shaders to handle multiple lights, mixed lights with shadow distance fading, and baked lighting, and that seems like a pretty difficult task to create all that functionality in a fragment shader…
I’m developing for mobile but URP isn’t an option at this time.