Skip to content

Broken rendering with khronos GLTF PrimitveModeNormalsTest #7639

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

Open
MAG-AdrianMeredith opened this issue May 2, 2025 · 3 comments
Open
Assignees
Labels
area: graphics Graphics related issue bug

Comments

@MAG-AdrianMeredith
Copy link
Contributor

MAG-AdrianMeredith commented May 2, 2025

Image

The official GLTF samples repository has an example https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/PrimitiveModeNormalsTest which doesn't render correctly on macos m3 max

see attached model

PrimitiveModeNormalsTest.glb.zip

@MAG-AdrianMeredith
Copy link
Contributor Author

also in playcanvas viewer

Image

@mvaligursky mvaligursky added bug area: graphics Graphics related issue labels May 2, 2025
@MAG-AdrianMeredith
Copy link
Contributor Author

Its slightly less broken in webgpu but still incorrect

Image

@mvaligursky
Copy link
Contributor

I improved this in #7706 - now it looks the same in both WebGL and WebGPU (in the engine example created for this)

Image

The remaining issue is that those meshes that do not have normals in the glb should render as unlit. In our glb parser we call generateNormals to generate normals for meshes without them. Ideally we would avoid doing this and configure material to not depend on them, but changing this would possibly break many projects, so I'm hesitant to do so.

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

No branches or pull requests

2 participants