0 Replies Latest reply on Nov 24, 2010 4:29 AM by Cherax79

    change shader on a sphere

    Cherax79 Level 1

      Hello.

       

      I have a strange problem with changing shader on a sphere model while runtime.

      Let's say:

      tModel : is reference to sphere model

      tShaderYellow : is reference to standard shader with yellow texture

      tShaderBlue : is reference to standard shader with blue texture

       

      now, if I do:

       

      tModel.shader = tShaderYellow

       

      I have a sphere which is yellow...

      ...and then in runtime i change it:

       

      tModel.shader = tShaderBlue

       

      I get a green Sphere :/

      It seems like shaders overlayed but:

       

      tModel.shaderList : contains only 1 shader (tShaderBlue)

       

      what I do wrong ?

      (sorry for my poor english)