Hi,
So I was looking through some of the built in shader code (4.3.4 to 4.5.2) as you can often learn some useful little tips from them and in several of the ‘Nature/TreeCreator’ ones (e.g. ‘TreeCreatorLeavesOptimized’) there is the exclude renders pragma with the option ‘noshadows’.
I’d not seen this before and obviously its undocumented.Even more strange is that its defined in the ShadowCaster and ShadowCollector passes, where one would expect to want shadows
Anyone ever come across this? Anyone know what it does? Perhaps its a typo and is just ignored?
Just an idea – ShadowCaster and ShadowCollector are themselves geometry passes – when those mesh draw-calls are issued, they should probably exclude any logic related to shadows that a normal visible draw-call would include?
It basically means “don’t even compile this shader for platforms that definitely don’t have shadows”. This used to be some platforms back in the day, but I think nowadays all platforms have shadows. So basically, “#exclude_renderers noshadows” does exactly nothing.