Hello,
I’m doing a project with day night cycle and I encountered a problem with the tree creator leaf shader. I can see specular highlights in the leaves even when there are no lights in the scene. The exact shader in use is the Hidden/Nature/Tree Creator Leaves Optimized. The effect seems to be worse where the vertex normals are parallel to the view direction.
I got the trees from the asset store and I am not exactly sure if this could be caused by the assets themselves, but I don’t believe this to be the case. I have a web player build demonstrating the issue here.
After looking into this matter some more, it seems that the shader somehow gets some default light even when there are no actual lights in the scene.
Here are some other clues I found about this weird behavior. When I activate a light in pixel-lit mode, the specular highlight follows accordingly. When I deactivate that light, the highlight stays in that position. It doesn’t matter if the light’s intensity goes to zero, the highlight still persists. I guess the specular lighting doesn’t care about the light’s intensity. Also, the highlight does not change when there are just lights in vertex-lit mode.
This thing is getting really annoying right about now, and I can’t believe no-one has had this problem before.
If you download the same leaf shader from here, it seems to work better…
although it seems to be missing shadow offset scale variable…(?) http://unity3d.com/unity/download/archive
Trees shader has definitely something wrong or it’s not well documented.
I only keep using them because of the uncomparable optimization, but I cut off the specular and translucence features, they are too much unreliable to be used, they introduce too much hassle in the workflow.