AS3 Circle Gradient

According to my previous post about the AS3 Circle Color Spectrum I wanted to implement the circle gradient in pixel bender as well, so there you go. You can specify up to 4 colors and control the appearance with the corresponding ratio.

the parameters for the shader

  • center for passing in the x and y
  • innerRadius and outerRadius for controling the size of the circle
  • rotation (0-360) to change the starting angle
  • color1, color2, color3, color4 in the format RGBA (1.0, 1.0, 1.0, 1.0 = 0xffffffff)
  • ratios an array of color distribution ratio

Play with the filter…
Download Circle Gradient filter & pixel bender source



Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Other Entries

About

Martin Rädlinger is an Interactive Developer & Designer. He specializes in interactive coding predominantly with ActionScript, but every new challenge is welcome. If you like his work feel free to get in touch with him. At the moment he's available for freelance work.

Contact

Martin Rädlinger
mail: mr [at] formatlos.de
web: www.formatlos.de
xing: Martin Rädlinger
linkedin: Martin Rädlinger
skype: martinraedlinger