Shield

Author: Omar Rojo (Toack)

Description
This is an special effect shader to make Shields-like shapes, ideal to put a shield around your spaceships and robots.



Unity 5.0
It seems you can no longer construct float4 using a single arument, changed the shader accordingly. Also o in the vert function needed to be initialised before exit and therefore the function could not be empty, fixed that as well.

Unity 3.3
For some reason the Aubrey Falconer shader below does not shows up in Game mode. I post here an updated version of it, without the soft particles, that takes color alpha in account as well. Thanks to the Aubrey Falconer and the Toack for the sharing their code. ( Ippokratis Bournellis )

Unity 3.3 and IOS
This version uses the same algorithm as the above shader (and will work fine on Desktop and WebPlayer), but is designed to be faster on IOS profiles. It has been tested on 3GS hardware. It might also be faster on older PC hardware too.

Unity 3
Inspired by the original Shield Shader featured on this page, Aubrey Falconer created a new one using the Strumpy Shader Editor that is compatible with Unity 3, incorporates soft particle blending, automatically moves the plasma UV inside the shader, offers more control over the rim V center strength, and includes the ability to control the strength of the shield's backface which can be used for some pretty neat effects. Here it is!

Usage
There is an script to work the animation.

The shader by itself is nothing:  Make a good Plasma-like texture for the shader texture Make a good bright-to-dark ramp texture on the u axis 

The shader has an additive effect, this is meant to give some light emission effect and also make it work with other meshes.

Caveats
I have no idea what graphics cards it will or won't work on.

Resources
Here is some examples of the textures used by the project to get you started, you can get the idea from them.

The facing ratio ramp, this can be adjusted as needed (white=opaque black=transparent left=not-facing-camera right=facing-camera)



Two different plasma like textures, import them as bump maps.