Only the Texture's URL was used to create the ModelRenderCache which bugs is two textures instances using the same URL were created (and disposed)
@@ -1057,7 +1057,20 @@
}
- modelKey += v.name + ":" + ((propVal != null) ? ((v.typeLevelCompare) ? Tools.getClassName(propVal) : propVal.toString()) : "[null]") + ";";
+ let value = "[null]";
+ if (propVal != null) {
+ if (v.typeLevelCompare) {
+ value = Tools.getClassName(propVal);
+ } else {
+ if (propVal instanceof BaseTexture) {
+ value = propVal.uid;
+ value = propVal.toString();
+ }
+
+ modelKey += v.name + ":" + value + ";";
});