How do you do this? BattleRite Ruh Kaan (Fresnel Edge)

Hey Folks,

I have a question- How do you create this Fresnel Edge in ShaderForge? I want to apply it to a texture that dissolves over-time similar to the image below. AFAIK, the Fresnel network will be different depending on whether its a texture or a mesh.

Is this something similar to Alpha Clip Edge Dissolve?


I think I may have figured it out actually (thanks to a small suggestion)!

Instead of using power (which is expensive) I used step. It gives a harder edge and does what I want it too. Input A seems to dictate how thick/thin the edges are. Also, the Smoothness Slider will affect the Edge. If you want it smoother, you need to adjust the Stepping as well. Cool!

The Slider is just there for testing. I use the Z channel from the UV Coordinates to make the effect work real-time with Custom Vertex Streams in Shuriken.


Oh, you figured it out while I was typing an answer :smile: But I’ve got some more relevant information for you:

From what I can tell the effect in your youtube link and these 4 purple ones on your reference images work differently.
The glow of the dissolve shader only works “within” textures, while the purple ones use a glow that’s probably created by a post-processing effect, also called screen shader or image effect.
I once saw this asset from the unity asset store which is said to enable per object glow - haven’t tried it by myself though. Unfortunately I don’t know how to create a post-processing effect which can do this kind of selective glow. So if there’s a shader genius stepping by who knows how to do this, I’d like to know too :slight_smile:

However these glow effects have nothing to do with fresnel. The fresnel effect depends on the normal direction of a surface in relation to the camera position, which in case of e.g. a sphere leads to a gradient along the outline. On a flat surface a fresnel effect doesn’t work, that’s why in your case a dissolve shader should be the best way to go.


Yep! :smiley: Thanks for the info. Fresnel was what came to mind when talking about edge lighting/coloring.

Yea It’d be nice to know if there’s another method (more efficient) since this is for a mobile application. There are certain operations that are more expensive (i.e. use step instead of power) and instruction count is very important.

Not a shader genius at all, but selective postprocessing might have something to do with the stencil buffer. You can set a different stencil value for different objects and then apply different effects based on the stencil buffer value. I’ve seen it done that way in Unreal and I’ve used the stencil buffer in Unity before but not for that, so I can’t tell for sure.


Summoning @Limeslushie to see if he has any firsthand insight on how this was made.

1 Like

Summoned! On the hand mesh there’s an outline shader, on the rest of the parts its nothing as fancy, 2 textures/meshes stacked atop of eachother with one being black and the other pink, the black ones have slightly less Start Alpha. Also some render offset on the pink part so it’s under the black. And It’s all alpha erosion.


I’ve never quite understood precisely what people are talking about with Fresnel. There’s a whole suite of equations for how light is reflected and refracted and I don’t think the Unreal node is perfectly faithful? (could be totally wrong.)
I’m pretty sure it’s grossly simplified but i havene’t cracked open the node to see. And maybe i don’t need to.
Any time someone says “fresnel” i just assume they mean edge glow. :slight_smile:

So, Fresnel equations describe how much light would be reflected under a certain angle between two different volumes?
I always use it as a dot between camera angle and vertex normal.


Not just edge glow, but the fact that the value depends on the angle between the surface and the viewer. If the Unreal node is simplified it’s probably for performance reasons, but the resulting effect is similar.


Here’s a collection of my favorite Battlerite effects. Search FX


Can you share how your initial texture was made? Your Alpha Erosion effect looks so nice. I can guess that there are gradients from black to white, but how you actually made it? Draw by hand or generated in photoshop?


It’s a hand-painted texture in the alpha channel.

You can use a combination of Gaussian blur, smudge tool and brushes to create small pockets in the texture. If you create small dots the texture will open up from that point like a hole. The more small details you create, the more complex it’ll erode. Smudging can create small ramps too.

Here’s an example of the alpha texture.


The Diffuse is white. You can make it detailed if you want additional noise.


Thank you very much!