Hi There,
Is it possible to blend unity materials using the alpha channel of a PNG or a 2/grayscale color texture?
It is a very old and common thing in regular 3d packages, but I haven’t been able to found a tutorial on how to do this on unity.
Hi There,
Is it possible to blend unity materials using the alpha channel of a PNG or a 2/grayscale color texture?
It is a very old and common thing in regular 3d packages, but I haven’t been able to found a tutorial on how to do this on unity.
The wiki has a shader that does that:
http://unifycommunity.com/wiki/index.php?title=LayerShader
There are other variants there as well.
There is no way to blend Materials themselves in unity. You must either combine the shaders and use a unified material, or modify the second material to use a mask for alpha blending.
Thanks, but the link you pointed to refers to terrain objects.
Is there any way to do this onto imported geometry, other than braking it up in different polygons.
I’m building a city chunk here, and doing so would take my polygon budget down to hell.
Although the LayerShader was designed to be used on objects representing terrain (not Unity’s built-in terrain engine), it can be used on arbitrary meshes, like any other custom shader.
Great! I’ll give it a try.