ken.mayfield Posted November 7, 2013 Posted November 7, 2013 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).
frustum Posted November 7, 2013 Posted November 7, 2013 mesh_layer_base material allows to mix two different materials in according to blending texture.
ken.mayfield Posted November 7, 2013 Author Posted November 7, 2013 Would it be possible to drive the blending via a procedural value instead of a texture?
ulf.schroeter Posted November 7, 2013 Posted November 7, 2013 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
unclebob Posted November 7, 2013 Posted November 7, 2013 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.
frustum Posted November 7, 2013 Posted November 7, 2013 Mesh_layer_base performs two material calculations independently. Mixing texture blends final shading results.
ken.mayfield Posted November 8, 2013 Author Posted November 8, 2013 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.
Recommended Posts