Making a Real Time Stylized Sword Aura Effect with Shaders

Sword Aura

  1. Create a plane where the pixel shader which creates the aura can run on. To do this I use Booleans in Blender.
  2. Create a base line for the aura effect around the sword.
  3. Add the waves to the base to animate it.
  4. Add a noise to make it swirly.
Two different noise textures

Creating the Base Plane

Plane centered on the blade
Plane after boolean
Clean up and triangulation

The Base Shape of the Aura

uv.y = abs(uv.y *2.0 - 1.0); 
Centered UV
float AuraOn = function(uv.x)
if(uv.y < f(uv.x)) outPutColor = float4(0.,0.,0.,0.);
else outPutColor = float4(0.,0.,0.,0.);
outPutColor.xyz = step(AuraOn, uv.y).xxx;
outPutColor.xyz = smoothstep(AuraOn - blurAmount, AuraOn, uv.y).xxx;
AuraOn = uv.x;
y=x
auraOn = abs(fract(uv.x + 0.5)-0.5)
frac function triangle
The base shape for the aura

The Wave Effect

auraOn = auraOn + sin(uv.y *25.) * 0.2;
auraOn = auraOn + sin(uv.y *25. + Time) * 0.2;

Creating Swirls

Final Thoughts

Resources

  1. Harry’s post which inspired this one: https://twitter.com/HarryAlisavakis/status/1304367957561180160?s=20
  2. Kama Dagger, the dagger in the demo: https://skfb.ly/JSts
  3. HDR Skybox used in the demo by Greg Zaal: https://hdrihaven.com/hdri/?c=night&h=fireplace

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store