From da078635112c23be67a848fcb16e06f66f0271a9 Mon Sep 17 00:00:00 2001 From: Kingshuk Kundu <44145229+kingshukkundu@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:46:54 -0500 Subject: [PATCH] fix(HDRCubeTextureLoader): colorSpace <=> encoding fallback (#339) --- src/loaders/HDRCubeTextureLoader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/loaders/HDRCubeTextureLoader.js b/src/loaders/HDRCubeTextureLoader.js index 91ceac1d..d011762e 100644 --- a/src/loaders/HDRCubeTextureLoader.js +++ b/src/loaders/HDRCubeTextureLoader.js @@ -60,7 +60,8 @@ class HDRCubeTextureLoader extends Loader { const dataTexture = new DataTexture(texData.data, texData.width, texData.height) dataTexture.type = texture.type - dataTexture.encoding = texture.encoding + if ('colorSpace' in dataTexture) dataTexture.colorSpace = texture.SRGBColorSpace + else dataTexture.encoding = texture.encoding dataTexture.format = texture.format dataTexture.minFilter = texture.minFilter dataTexture.magFilter = texture.magFilter