Skip to content

Commit

Permalink
Compressed material key hash update (#7188)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck committed Dec 9, 2024
1 parent d1decb6 commit 62283c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scene/gsplat/gsplat-compressed-material.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 62283c1

Please sign in to comment.