Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed material key hash update #7188

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Dec 9, 2024

Compressed gsplat material wasn't generating key with defines.

@slimbuck slimbuck added bug area: graphics Graphics related issue labels Dec 9, 2024
@slimbuck slimbuck requested a review from a team December 9, 2024 14:55
@slimbuck slimbuck self-assigned this Dec 9, 2024
@@ -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('-') ?? '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this in other generators:
const definesHash = ShaderGenerator.definesHash(options.defines);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah

@slimbuck slimbuck merged commit 91371e5 into playcanvas:main_v1 Dec 9, 2024
8 checks passed
@slimbuck slimbuck deleted the gsplat-v1-fix branch December 9, 2024 14:58
slimbuck added a commit to slimbuck/engine that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants