diff --git a/panda/src/nametag/chatBalloon.cxx b/panda/src/nametag/chatBalloon.cxx index 247d080e50..e793502dbf 100644 --- a/panda/src/nametag/chatBalloon.cxx +++ b/panda/src/nametag/chatBalloon.cxx @@ -18,6 +18,7 @@ #include "sceneGraphReducer.h" #include "cullBinAttrib.h" #include "cullFaceAttrib.h" +#include "depthWriteAttrib.h" //////////////////////////////////////////////////////////////////// // Function: ChatBalloon::Constructor @@ -170,6 +171,9 @@ generate(const std::string &text, TextFont *font, float wordwrap, PandaNode *text_parent_node = (PandaNode *)NULL; + // This is required for modern Panda3D. + text_geom_node->set_attrib(DepthWriteAttrib::make(DepthWriteAttrib::M_off)); + if (for_3d) { // If this is to be a 3-d chat balloon, we have to decal the text // onto the middle piece.