when I zoom in and out using the mousewheel, the materials of the clouds (ground mesh), and sky sphere render irregularly. When the camera position is inside the bounds of the sphere, when the camera position drops below clouds.position.y / 2, the sky sphere renders incorrectly in front of the clouds. Also relevant but less concerning is that when I zoom out, the clouds mesh renders incorrectly in front of the sphere.
update: I was able to fix this from the perspective of inside the sphere, by setting: skyMesh.alphaIndex = 1, which means the sky will always render in the background, which is what I want. But I’m still curious as to how I could fix this so it behaves more like StandardMaterial in this case. Thanks
thank you. Apologies for all the questions. Sometimes the answers can be a little opaque. Forgive the pun … I did reference that document, and I believe that’s where I found my fix. I guess I’m wondering why the standard material takes care of the depth buffer very elegantly, while with node material, this isn’t the case, and as always looking for an easy fix … In any case I will continue with my investigations. Thank you for your help in general and for this fantastic library.
That’s because you plugged something into the a input of the FragmentOutput block: the system considers your material to be transparent, even if alpha=1.
You should plug a color3 into the FragmentOutput.rgb input instead and that should fix your problem.