Material Blend Shader

After watching Ben Cloward’s Shaders 101 talk, I wanted to have a go at one of the examples he’d shown.

I’ve created a material blend shader, which blends between two sets of albedo and normals, putting the second material (moss, snow ect) on top.


I created a mask to use as a interpolator between the two texture sets. The first thing I had to determine was where the up direction in world is, so the second texture would only show on top. To do this I converted the base normals into world space, then masked out the z channel. (Unreal is Z-Up)


After that I had to make sure there was a sharp blend between the two sets, as we don’t want the moss fading in. To do this, I clamped the output from the mask between 0 and 1, subtracted 0.5, multiplied by the desired sharpness amount (in this case 1.5) and the added the 0.5 back on. After that I clamped again to reduce any additional blur.


I then plugged that mask into the alpha of the lerp and voila!

The textures and models leave a lot to be desired as these are just simple assets I threw together to show off the shader. Would be cool to get this on some proper models at some point!





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s