0
Fixed

specular highlights masked by shadows, broken?

BecomingAt . 11 years ago updated by Freya Holmér (Developer) 11 years ago 9
in my new shaders the "specular highlights masked by shadows" checkbox does not work anymore... is there something i could be doing wrong? maybe its a bug?
in my older shaders from previous versions this feature worked like a charm.
Seems to work fine for me. However, it will only mask the primary directional light, not point lights or multiple directional lights. Perhaps you have an additional dir light you just haven't noticed yet?
It might be a very naive question, but would it be possible to have this feature also work with point lights?
Possibly, but not at the moment. If you really want that, open a new topic on it :)
hmm, i will take a look if i have overlooked something but i think it should just work since i have the old shader and the new one side by side in the same scene... on the old it works and on the new it does not... i guess it somehow broke while working and unfortunately i didn't notice it immediatly when it happend.
Strange. If you open the old one, does it stop working?
i will make a copy before trying that :D 
maybe i can check for it later today
I was looking for the reason and found out that the object did not recieve shadows even if recieve shadows was on in the inspector... looked into the shaderforge settings and noticed that the blendmode was set to alpha blended... and of course no shadows, no masking! So this topic can be closed :)

The only question would be why was it set to alpha blended because i certainly did not change it...

Maybe i connected something accidentaly into the alpha input of the main node for a moment. I dont think its a real issue but maybe you want to make sure it changes back to blendmode "off" when nothing is connected to the alpha input anymore. Would make SF a little more idiot proof :D
Yeah, I've planned to have a override/auto setup in the blend settings as well, because if you manually set it to Additive, for instance, you wouldn't want Alpha/Alpha clipping to override that. Could you open a new topic on that?