0
Fixed

sky shader unity 5.0.1

Ben Wilkinson 9 years ago updated by Freya Holmér (Developer) 9 years ago 1
I had made a working sky shader in unity 5.0.0 (put into the sky slot in lighting) it wasnt perfect see here (http://shaderforge.userecho.com/topic/707321-enable-sf-sky-shaders-to-cast-ambient-light-in-unity-5/).
Now it no longer works due to something unity changed. ive traced it back to the dot product between the directional light and normal. Only occurs on non mesh objects (ie sky).
Could it be this update (take from update log http://unity3d.com/unity/whats-new/unity-5.0.1):

  • Graphics: Shaders now read consistent values across platforms for vertex properties that are missing in a Mesh. We have adopted the OpenGL standard, which is that normals default to (0,0,1) and tangents default to (1,0,0).
Sorry if its not a bug. ive found a work around by putting it on a inversere sphere. Not ideal.

Answer

Answer
Fixed
In that case, read the view direction instead of the normal in the sky shader :)
Answer
Fixed
In that case, read the view direction instead of the normal in the sky shader :)