Basically I have a pretty simple scene and I just need the one object in it to look its best. The lighting in it can be readjusted by the user so baking is not possible.
I’m running into an issue with the mobile bumped specular shader where when modifying one of the lights there’s a weird swap with the normal mapping that occurs. As far as I can tell this is because the mobile shader supports only 1 directional light fully. If I switch it out with the regular bumped specular shader the weird swapping goes away, but obviously performance takes a hit.
I’m not sure what to do about it. Also I have no idea what I’m doing- I mean I’ve made simple shaders before but looking at the compiled version of the mobile shader is like looking at the ark of the covenant for me.
If that involves lightning shooting from the shader to your head, to a nearby lightsource and generator, I’d love to see a video of that. Unfortunately, we all know that video equipment gets blown up too :(.
It is probably easier to view the source of the shader. Luckily you can download those from the Unity3d site.
It appears that limiting it to 1 directional light is one of the optimizations (It uses a custom light model ‘LightingMobileBlinnPhong’, and disables the forward rendering additive pass):
I guess you could try copying the code to a custom shader and replacing:
to make it use the default BlinnPhong lightmodel instead of the custom ‘MobileBlinnPhong’. Although I haven’t tested that, and I don’t know how badly it affects performance. Hopefully it helps.
Oh and don’t forget to change the name to something else, like: