Squeeze & Rotation Shaders

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • These are three shaders I've created that anyone is free to use for any purposes, no credit needed at all.

    #1: PT_Rotate
    This is a simple 'optimized' edited versions of Sphax's rotation pixel shader. It uses a sin/cos pseudo matrix instead of polar coordinates, which makes it run much faster- I use it on a 512x512 image at 50 FPS as a core part of one of my games, and the original rotate shader was not efficient enough.

    Parameters:
    fAngle: The angle, in degrees, by which the image is rotated counter-clockwise.

    #2: Squeeze
    This creates a 'black hole' effect, pulling all pixels in towards the center of the object, as pictured below. Optionally can have a little rotation around the center as it pulls inwards.

    Parameters:
    fCoeff: Float, given from 0.0 to 1.0, which determines how much to squeeze an image inwards. At 1.0, there will be no distortion. At 0.0, the particles are infinitely squeezed inwards from the edges. For smooth transitions, values should decreased logarithmically (1.0 -> 0.5 -> 0.25 -> 0.125)
    fAngle: Angle, in degrees, which determines how much to rotate an image inwards as it approaches the center. The amount of rotations increases direction with this value; 360 =/= 0. Each 360 degrees will cause one full spiral

    Please login to see this picture.

    #3: Squeeze Filter
    This is the same as the above, except works as a filter on the background instead of on an object- an object using this will use its X/Y bounds to create an ellipsoidal (circle) transformation of the background. You can overlay your black hole on top of the screen, as pictured:

    Parameters:
    fCoeff: Float, given from 0.0 to 1.0, which determines how much to squeeze an image inwards. At 1.0, there will be no distortion. At 0.0, the particles are infinitely squeezed inwards from the edges. For smooth transitions, values should decreased logarithmically (1.0 -> 0.5 -> 0.25 -> 0.125)
    fAngle: Angle, in degrees, which determines how much to rotate an image inwards as it approaches the center. The amount of rotations increases direction with this value; 360 =/= 0. Each 360 degrees will cause one full spiral

    Please login to see this picture.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!