True Image Effects for Unity Indie.
This here is the Indie Effects pack, one of the only free ways of getting image effects in Unity free. With this epic pack, you can do fisheye lensing, motion blur, bloom and lighting FX, SSAO, vignetting, chromatic aberration, radial blur, and an easy to use API to code your own FX! But where’s the motion blur you ask? Unfortunately, an improvement in performance came at the cost of breaking the original motion blur, so for now, there is none. I am working on a camera-based solution that uses motion vectors instead.
Basic Setup and Use in Unity Free:
Here are the basic setup steps. Unlike previous versions, it isn’t as fiddly as it was anymore! Now, let’s get started:
Examples of effects (more to come):
When writing your own effects for Indie Effects API you will need knowledge of the functions contained within.
For a basic view of how a script interfacing to this API should work, here is a basic template for any “indie effect” (you can use this as a base if you like!) Copy and paste this code into a new JavaScript, then tweak it however you like:
Javascript example:
#pragma strict
@script RequireComponent(IndieEffects)
@script AddComponentMenu(“Indie Effects/FX Skeleton”)
Import IndieEffects;
var fxRes : IndieEffects;
private var mat : Material;
var shader : Shader;
function Start () {
fxRes = GetComponent(IndieEffects);
mat : new Material(shader);
}
function Update () {
mat.SetTexture(“_MainTex”, fxRes.RT);
//if your effect doesn’t use depth buffer, comment this out
mat.SetTexture(“_Depth”, fxRes.DNBuffer);
}
function OnPostRender () {
FullScreenQuad(mat);
}
C# example:
note the c# version still needs to be ported.
using IndieEffects;
[RequireComponent(IndieEffects)]
[AddComponentMenu(“Indie Effects/FX Skeleton”)]
public class ExampleEffect : MonoBehaviour {
private Material mat;
public Shader shader;
public IndieEffects fxRes;
void Start (){
fxRes = GetComponent(IndieEffects);
mat = new Material(shader);
}
void Update (){
mat.SetTexture(“_MainTex”, fxRes.RT);
//if your effect doesn’t use depth buffer, comment this out
mat.SetTexture(“_Depth”, fxRes.DNBuffer);
}
void OnPostRender (){
fxRes.FullScreenQuad(mat);
}
}
When using effects with depth buffer, use the variable DNBuffer in the base script to assign to the shader. It is also possible to remove the @script lines up top for a performance boost, but it is not recommended you do this until final build time.
Effects Included in the package:
If you want to make a comment, give credit, or need help with this, you can email FuzzyQuills at neubot321@gmail.com. You can also post on the Indie Effects thread at Indie Effects Thread if you like to help other users or want to give credit! (Or even suggest a new effect you think FuzzyQuills could do. There are lots of suggestions being posted all the time) Coming soon: Various bloom fx, to spruce up scenes. Thanks to FrostBite23 for offering to port them! Sun shafts effect. Again, thank Frosty! Cyrien5100, for helping out with SSAO. FrostBite23 now has a new SSAO coming as well.
Credits: Main Project Lead: FuzzyQuills
Color Balance Script provided by Tryder. Bloom script written by me. Base Bloom shader provided by Tryder, and tweaked by FuzzyQuills.
Special Thanks: