From 62283c19daace136fc2c0b31854789bc09b4ba28 Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Mon, 9 Dec 2024 14:58:49 +0000 Subject: [PATCH] Compressed material key hash update (#7188) --- src/scene/gsplat/gsplat-compressed-material.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scene/gsplat/gsplat-compressed-material.js b/src/scene/gsplat/gsplat-compressed-material.js index f8d22754bf0..0376d108995 100644 --- a/src/scene/gsplat/gsplat-compressed-material.js +++ b/src/scene/gsplat/gsplat-compressed-material.js @@ -361,7 +361,8 @@ class GSplatCompressedShaderGenerator { generateKey(options) { const vsHash = hashCode(options.vertex); const fsHash = hashCode(options.fragment); - return `splat-${options.pass}-${options.gamma}-${options.toneMapping}-${vsHash}-${fsHash}-${options.dither}}`; + const defines = options.defines?.sort().join('-') ?? ''; + return `splat-${options.pass}-${options.gamma}-${options.toneMapping}-${vsHash}-${fsHash}-${options.dither}-${defines}`; } createShaderDefinition(device, options) {