The simplest way to make a planet in 2D that seem to rotate, was to make a sprite, set a mask, and have the texture offset animate. It worked, but there is a warning that this isn’t supported, and it makes the game kind of laggy.
So I want to know the best way to do this in the Shader graph. The current idea uses 4 textures:
- 2048x1024 (Planet texture, wrapping)
- 1024x1024 (Shadow overlay to make it appear rounded)
- 1024x1024 (Black outline, could probably be combined with the shadow I guess)
- 1024x1024 (Mask, to only show the circle)
Also I’d like to have another texture to simulate the position of the sun, but I guess that wouldn’t be an issue if I get the above working.
Should I still use a sprite, or should I use a mesh/quad instead? And how would I set this up in Shader Graph?
Oh and I’d also love to try and squish/bend the planet a little on the side to make it seem a little 3D. Is there a node for that?
Note that I’m using the URP and 2D renderer, but in this case, lighting isn’t required for the planets, but it would of course be good if I needed it for some reason, like for smalling rotating objects.
Here’s my current version using sprites:
Thanks for your time!