Skip to content

native morph workaround #16910

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

Merged
merged 5 commits into from
Jul 22, 2025
Merged

Conversation

CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet commented Jul 22, 2025

morphTargetCount is a uniform int;
but bgfx only support vec4 as uniform.
when doing the replacement, morphTargetCount.x is used and comparison between int i and morphTargetCount.x which is a float break shader compilation with GLSL.
casting morphTargetCount to int doesn't work: casting qualifier is removed becaused it's still an int before shader traversers.
Setting morphTargetCount a float in the engine and casting iterators to float seems to work better.
I've also done the change for WGSL to pass the tests.

Long term is to add (or change) traversers for float/int comparison.

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

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

Ahah

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jul 22, 2025

@CedricGuillemet CedricGuillemet marked this pull request as ready for review July 22, 2025 17:35
@sebavan sebavan merged commit c1e4347 into BabylonJS:master Jul 22, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants