From 4b34a05019b833f7b988ac57b216d4ca68e77c07 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Wed, 27 Dec 2023 23:13:55 -0600 Subject: [PATCH] fix(texture): flag newly created textures for upload --- src/lib/TextureManager.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/TextureManager.ts b/src/lib/TextureManager.ts index a14a28a..bdbe529 100644 --- a/src/lib/TextureManager.ts +++ b/src/lib/TextureManager.ts @@ -100,6 +100,9 @@ class TextureManager { texture.name = normalizePath(path).split('/').at(-1); texture.userData.cacheKey = cacheKey; + // All newly loaded textures need to be flagged for upload to the GPU + texture.needsUpdate = true; + this.#loaded.set(cacheKey, texture); this.#loading.delete(cacheKey);