Jump to content

[SOLVED] Shader Blending


photo

Recommended Posts

Posted

Dear Unigine Developers,

 

Do you think it would be hard to implement shader blending in Unigine?  I know this has been done in Unreal:

 

 

They are using a simple texture mask to blend between multiple shaders on a single mesh, instead of using separate material ID's on the mesh (the classic way of doing it).

Posted

mesh_layer_base material allows to mix two different materials in according to blending texture.

Posted

Would it be possible to drive the blending via a procedural value instead of a texture?

Posted

Should be possible by inheriting a material from mesh_layer_base and replace the fragment shader. Then within a copy of the base shader simpl replace the texture lookup with your procedural code for blend weighting

Posted

Hi Ken!

 

By using mesh_layer_base you can mix two basic materials (diffuse + normal), it's actually not shader blending as we're mixing textures instead of shaders. Ulf's right, to implement your blending logic just inherit from mesh_layer_base and replace the fragment shader.

Posted

Mesh_layer_base performs two material calculations independently. Mixing texture blends final shading results.

Posted

Thanks guys... my evil plan looks very plausible at the moment with all of this information.

 

It's been a while since I've been using Unigine without mobile in mind, so I'm having some fun.

×
×
  • Create New...