Browse Source

pgraphnodes: Fix ShaderGenerator reusing wrong shaders

rdb 1 year ago
parent
commit
0a811a4543
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/pgraphnodes/shaderGenerator.cxx

+ 3 - 0
panda/src/pgraphnodes/shaderGenerator.cxx

@@ -2274,6 +2274,9 @@ ShaderKey() :
  */
  */
 bool ShaderGenerator::ShaderKey::
 bool ShaderGenerator::ShaderKey::
 operator < (const ShaderKey &other) const {
 operator < (const ShaderKey &other) const {
+  if (_flags != other._flags) {
+    return _flags < other._flags;
+  }
   if (_texture_flags != other._texture_flags) {
   if (_texture_flags != other._texture_flags) {
     return _texture_flags < other._texture_flags;
     return _texture_flags < other._texture_flags;
   }
   }