This worked using 1.7.0, but now it has issues.
I’ll try to explain clearly:
- I load a model and apply a shader to it.
- I apply a different shader to one part of that model.
- I use setTexture(texture, 1) to apply a texture to the part of the model.
- Some time later, I use setTexture(another_texture) to replace the first texture.
- Now the part of the model does not display properly, and the UV coordinates are being given to the shader as 0, 0 (tested by using a shader which outputs UVs as the output color).
Now here are two things that “fix” it:
- If I call clearTexture() just prior to calling setTexture the second time, it does not have this problem. Took me a whole day to figure that one out.
- If I do not call setShader on the part of the model, thereby having it use the shader applied to the model as a whole, it does not have this problem.
So it looks like some wires are getting crossed in the case where a shader is applied to a node and also to some other node below it.
This seems like it may be related to the new shader features?
Oh and by “latest CVS source” I mean yesterday.