Rotating sphere with a 2D shader using HaxeFlixel

Hi everyone!

I try to figure out how to make a 2D “rotating sphere” with haxeflixel, my first clue is to use shaders.
I want to achieve something like that:

For what I understand using shaders would be good start to move my texture on a circle shape and give that feeling that it’s a rotating sphere.

My question is: Am I thinking in the good direction?
And if yes, how to start with shaders? I’m quite confuse by all what I kind read.


I’m not sure this needs shaders. I’m not saying you can’t, but bear with me.

The picture you shared is all flat 2D pixels. The key is determining where each graphic should be drawn. At least, this applies to all the clouds and particles.

Those could be done using 3D math, projected to 2D, then you know where to put your 2D graphics

However, for the sphere itself, I do get the feeling this may be a true 3D sphere, then it uses a shader to make it look more pixellated. Does it need to be dynamic? You could also pre-render this out to a spritesheet