Hi @all,

I've created a custom Hardware Shader Node (MPxHardwareShader-derived) and I'm using MUniformParameters and MVaryingParameters as the Docs suggest.

Now I'd like to have one shader node connected to at least two different geometries - no problem so far.

Let's just construct the example: the shader produces a kind of paint.  Now our two geometries shall have different ambient colors.  The shader node finds changes in uniform parameters in correspondence to a geometry [MUniformParameter::hasChanged(MGeometryList &)].  What I am seeking is the correct way to tell the shape/mesh node, what color it shall have.

Has anyone already had such a problem?  In this case the docs just lack further information...

P.S.: the MUniformParameter has no semantic bound

  • created

    Dec '13
  • last reply

    Dec '13
  • 1

    reply

  • 985

    views

  • 1

    user

Well you could just use 2 different shader instances, thats the general idea behind maya. Alas not realy a problem you can add a input with any number of subinputs and then color by mesh id like shading switches do (its just that artists will feel this sis a bit overkill since just adding one more node accomplishes the same thing*). So yes it can be done.

  • the only reason to do the switch if you need to encapsulate suff in scenes via individual connections or your using partilces.