flatten*** and vertices

Is there any way to preserve the vertex colors (especially alpha) through a flattenStrong/flattenMedium/flattenLight? I suppose I could write my own, but there is no need to reinvent the wheel…

Use ColorAttrib.makeVertex():


Will this problem go away (as with yours) in the next release when it is included?

No, it’s not really a problem. It’s just a rule change: with the recent version of Panda, we have asserted that in order for per-vertex colors to be interpreted correctly, you have to apply a ColorAttrib.makeVertex() attribute to the node.

When Panda creates a Geom, it will always apply the ColorAttrib.makeVertex() when there is per-vertex color. But if you create a Geom from scratch, you will need to do it yourself.

It just so happens that in certain modes, you will still see the vertex color even without having set a ColorAttrib on the node. It could be argued that this is the actual bug, because it leads people to believe their geometry is correctly defined, when in fact it is not.

The main reason we made this change is to help out the ShaderGenerator, which needs to know based on examining the render state alone whether a particular geometry has per-vertex color or not.