Override lighting model globally... Possible?

Hello all,

Is it possible to override all surface shaders’ lighting models without rewriting the shaders?

I’ve tried replacement shaders, but that disables dynamic batching and my draw calls increase 450% (if anyone knows of a solution to that I’d be greatful too :smile: ).

Thanks!

You would need to overwrite the Lighting.cginc that comes with Unity.

Not sure if placing your own version inside of your project folder will do that or whether you’ll have to overwrite the one that’s there.

I need to be able to set the override on a scene-by-scene basis. I considered changing Lighting.cginc, but I think that is a one time only thing.

You should write your own customlighting.cginc with your custom lighting functions and you should use those custom lighting functions in all your custom shaders which needs them.

Is it possible for Deferred Lighting mode?