How do RenderStates combine with each other?


I have a quick question about the scenegraph in general.

If I have a node that has a textureState texA applied to it.

And then within that node, I added a Box which has a textureState texB applied to it.

How does jme combine to the two texture states?

I've tried it out, and it seems that texA is just ignored? Is this the proper behavior?

Thanks for your reply


Several render states have different policies for how to combine them… Light states are combined by default, while texture states are replaced.

Texture states combine by default on a unit by unit level.  So if you have a parent with a texturestate that has textures in unit 0 and unit 1 and a child with a texturestate that has only a texture in unit 0, it will inherit the unit 1 texture of its parent (you can change this behavior, on a per spatial level by changing its texture combine mode.)

Ah okay, that makes sense.

Thanks very much for your help.