Slindev Planet Shader - reversed lighting

Hello All -

I’m using the Unity 3.0 version of Slindevs Planet Shader from the wiki. However, it seems to be reversing the lighting on the model so the lit faces are at the back of the planet, rather than at the front of it (where it faces the point ‘Sun’ light). It isn’t the normals being flipped - there’s definitely something wrong in the shader.

Is there anyone out there that could maybe help me out with this?

Just put a “-” to invert the normalize or dot functions.

Try dot first and then try inverting the normalize functions, one is bound to work right.

But a word of caution, you’ll need to do much more work on his shader for it to work right on moving planets.

Thanks for the response, but I posted that 8 months ago and I’ve developed my own shader since. Thanks anyway!

Thanks for the response, but that was 8 months ago and I’ve developed my own shader since. Thanks anyway! :-o