I've been learning how to work with shaders recently and thought I'd share what I've been able to do so far. Shaders are still a bit of a black magic mystery to me, but I've learned enough to be able to port a few common shaders. I've included a .stencyl file so that you all can play around with them, alter, use them in your games, etc. I've only tested them on my PC, but they all run 60 fps for me!
First up is the Shockwave Shader
! Clicking on the screen creates a shockwave. Customizable amplitude, refraction, and width.
Next is the Magnify Shader
. This is just an adapted version of the Stencylpedia magnify shader that uses your mouse location to draw the magnification. Adjustable circle radius, minimum zoom, and maximum zoom.
Next, the Radial Blur Shader
. This creates a radial blur that gets blurrier the further away from the mouse.
Also include are 6 other shaders. These include in clockwise order starting from the top left:Posterization Shader.
Limits the amount of colors drawn to screen. Customizable number of colors.LED Shader.
Gives the screen an LED look. Customizable LED size and LED brightness. Most numbers look odd! Sketch Shader.
Gives the game a black and white sketched look. Customizable intensity.Thermal Shader
This converts colors to give a thermal imaging appearance. Lighter colors get converted to red, oranges, yellows and darker colors get converted to greens, blues and purples.Emboss Shader.
Gives an embossed appearance to the entire screen.Pixelate Shader.
Creates a pixel effect. Customizable pixel amount.
I'll be adding more shaders as I go. I currently have a chromatic abberation, a vignetting, a tilt shift, a glitter, a CRT effect, and a Gameboy-esque pallette swap shader in the works that I'll have finished soon.