engine
engine copied to clipboard
Batch Manager, missing texture on load
If a texture is not set to preload, and the entity belongs to dynamic batch group, the texture never shows up, unless the developer manually resets the batch groups.
Note, that it shows, if the batch group is static.
Repro: https://playcanvas.com/project/931757/overview/batcher-issue
the problem here is this part: https://github.com/playcanvas/engine/blob/e0d6dc44311d121a0676f3e859ac51eea264917a/src/scene/batching/batch-manager.js#L839
For dynamic batch, the material is cloned so that we can replace some shader chunks on it .. and as such it does not handle the loading of textures.