I have my own custom shader that is basically a direct duplicate of URP/Lit shader with some extra features. This shader is only instantiated at runtime and is not active in any scene prior to building. The shader is designed to work with normal maps, height maps, albedo maps, etc. just like the URP/Lit shader
If I don’t include the shader in the Graphics settings "always include shaders’ section, the shader will still work, it will just look crappy. I am assuming it is because it is not compiling the variants required.
If I do include the shader in the Graphics settings “always include shaders” section, it tells me it has 1500000 variants and the build is estimated to take 30+ hours just for this one shader. Even by manually commenting out a lot of the unnecessary keywords from the shader, it is still taking an insanely long time.
My Questions:
- Why does the URP/Lit shader work perfectly in build without a long build time? It seems like it is already compiled? Is there a way for me to do this?
- What is my solution for including my Custom/Lit shader in build without having to wait 30+ hours each time?