Link to the playground: PG
Steps to reproduce:
- Create standard material and some texture, but don’t apply the texture to the material yet.
- Create a number of meshes that would share that material, and optionally a number of their instances. Make sure some of them are positioned out of the view of the camera.
- When texture is loaded, apply it to the material as a diffuse texture.
- Observe that the texture seems to only be applied to meshes/instances that are in the viewport (not 100% sure about that criteria though), but other meshes/instances remain grey, although they all share the same material.
NOTE: this also happens just for the meshes, when there’s no instances created.
Marking the material as dirty explicitly after applying the texture doesn’t seem to make any difference (it would only work if one zoomed the camera out viewing all the meshes/instances).
Can be reproduced with BJS 5.x, but not with BJS 4.x