HTML element as Texture source seems to bug

When passing an HTML image to the Texture constructor, the url (first parameter) is used to “tag” the texture cache. If you pass the same value in both cases, the first texture will be reused in the second case because it will be found in the cache. You simply have to use a different url when creating the textures:

Note that pointing to https://encrypted-tbn0.gstatic.com/... triggers a CORS error, so I tested with two images coming from the Playground textures directory.

[…] Using Tools.SetCorsBehavior makes it work with your url:

3 Likes