Polished off my circle shader for jME. With the circle shader you can draw circles that fade between up to seven different colors on quads. These circles are drawn by the shader rather than from a texture so they are fully scaleable without pixelation.
Circles can be modified with an optional color texture which multiplies the circle’s color and alpha values. They can also be distorted using a normal map. Both the color texture map and distortion map can be tiled and offset opening up a wide array of effects through animating these textures either by scrolling them or using sprite sheets. The distortion feature uses x and y strength properties to determine the amount of distortion to be applied.
The radius and circle center can be set and animated along with the position of each color along the radius. Color positions are set as a percentage along the radius so changing the radius will not effect the position of your colors within the circle, they will scale appropriately with changes in the radius.
This shader can be used to create a variety of effects such as simple particles, smoke and fire, shockwave/ring-waves and lens-flare elements.
To download this package, along with source, and learn more about how to use it check out the pages I just uploaded to my web-site: http://1337atr.weebly.com/jme_circles.html
I also posted a tutorial on how to create the animated ring-wave featured above.
- distortion map =