4 textures shader

Hello guys!

I want ask you advise in one important decision that I need to make.

I am modeling and texturing tree. Pictures attached.
Now it has one shader/material applied on.
For trunk and roots I need 3 textures: Diffuse, normals and specular. Branches share diffuse map with trunk but need opacity map.

So shader have 4 maps now.

So question is: Is it possible to make in Unity shader that will give ability to use 4 mapped channels? Or better to split it on 2 shaders, one for trunk and root with 3 maps and one for brunches with two maps.

What combination will be better for frame rate performance?

Thank you.


Hi mr_Necturus,

It is possible to do this with one shader, but the shader would be quite large and complex. You mention that you are using an opacity map for the branches, are you using alpha blending or alpha testing, if you are using alpha blending and one material for the whole tree; it would force the whole tree to be rendered using alpha testing, this can lead to scene overdraw and blending is very slow.

I would split this into two materials, one with no alpha blending / testing for the main portion of the tree, then another for the branches.

Your tree looks very nice :smile:

Hey Stramit!

Thank you for clear answer and kind words about my model. Actually I not intend to use this tree in Unity. I have too small knowledge about it.

I am making scene of forest (tree is part of it) to sell it after in marketplaces. And I want it was made it right for Unity users.

So I will split my shader for two.

Thank you again!

mr_Necturus