Property Blocks (Shaders)
I was wondering if it is necessary to duplicate, or create instances of the materials for my lightsources. In theory all my lightsources should be able to use the same material and only the emission value should be controlled per light source. The problem is however, that when I change the emission value of the material all objects in the scene with that material change i.e. all lightsources, and this is something I want to prevent. The other option is to create instances of the material, which cause more batches for the GPU.
The solution I found was property blocks. I have duplicated the standard Unity shader, and added a simple line of code ‘[PerRendererData]’, which will tell Unity to compile the shader in such a way that the _Emission property is to be set per renderer, instead of being shared for all renderers using the shader.
Useful post about property blocks and shaders.















