New Year's IT ball



    Happy New Year everyone!

    I am the author of iPixelSDK and also join the New Year demoscene.

    Video and more about the process of creating a ball under the cut.



    Device: iPad
    Engine: Cocos2d 2.0
    Development environment: iPad iPixelSDK 1.0

    The development process on the iPad is as follows: The

    ball consists of 4 functions and 2 shaders.

    201000: 20. Stars (radial) Ball control function. Initializes an object, calls the move function, connects the draw function and shaders.



    201010: 20.0. # Draw (radial) The draw function. Draws a vertex array.



    201020: 20.0. # Init_stars (radial) Initialization of the ball, sets the number of points, color and position of each point in a spherical coordinate system.



    201030: 20.0. # Move_stars (radial) Moving points, rotation along the xz, xy axes.



    201100: S: 20.0. ^ Starfield.vsh (radial) The vertex shader, sets the size of the points, translates the spherical coordinates into three-dimensional Cartesian, and then into two-dimensional (since cocos2d is a 2d engine).



    201101: S: 20.0. ^ Starfield.fsh (radial) Pixel shader, draws a glare.



    Thanks for attention. Waiting for your comments.

    Also popular now: