Hi, I have been studying a bit of custom shaders, using as base the cartoon shader advanced sample; Using the ink shader gave weird results, as the shader was putting ink even in the texture contents, when it should put it only at vertex normals discontinuities. I then realized which putting this at my custom texture shader made the ink shader work like it did in the cartoon shader sample:
tempnode = NodePath(PandaNode("temp node")) tempnode.setShader(loader.loadShader("texcolor.sha")) base.cam.node().setInitialState(tempnode.getState())
Not considering the setShader(which I know what is), what has just happened? What does the first and last line of code do?
Also, my character consists of several parts which use two separated shaders(texcolor and vertexcolor), which are used if the model part has vertex colors or texture colors. The code above seems to just work when there is only one light shader, how would I go to do what the above code does with two diferrent light shaders, considering the fact which these two shaders will be applied several times each one(because of the several character parts)?
Thanks in advance for your help