engine icon indicating copy to clipboard operation
engine copied to clipboard

Batch Manager, missing texture on load

Open LeXXik opened this issue 3 years ago • 1 comments

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

LeXXik avatar May 20 '22 12:05 LeXXik

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.

mvaligursky avatar Jun 21 '22 14:06 mvaligursky