For my little project I am making dynamic skybox (moving sun, moon, etc), but I’m having some problems with rendering order…
For my skybox I’m using background sphere, quad with planet image, inner sphere and quad with sun image (check image).
By changing inner spheres alpha color I can change color of the sky and also cover up stars during day, problem is…
Because material is on the inside of the inner sphere, transparent render bucket is sorting objects in wrong order (pic 1).
I can fix this, by not adding inner sphere to transparent bucket (pic 2), but the problem is - planets aren’t rendered at all.
Again, I can fix that by removing planets from transparent bucket and setting alpha test to “true” (pic 3), but this way planets have little black space around them. I can live with that (it’s hard to notice with clouds).
My question is, is there a right way to fix my problems (maybe change skybox structure), or am I on the right track?