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

No vertex skinning when default material is used #19

Open
javagl opened this issue Aug 19, 2017 · 2 comments
Open

No vertex skinning when default material is used #19

javagl opened this issue Aug 19, 2017 · 2 comments

Comments

@javagl
Copy link
Owner

javagl commented Aug 19, 2017

The spec is (or was) silent on this point. The naive implementation of the "default material" (which should be used when no material was given) consists of a fragment shader that just emits the gray color, and a vertex shader that does the usual GL transforms.

However, this "default vertex shader" does not support skinning, because it does not have joint- and weight attributes.

This is not a big issue for now, especially considering the transition to glTF 2.0, but mentioned here so that it does not get lost.

@javagl
Copy link
Owner Author

javagl commented Sep 29, 2017

For glTF 2.0, there is now a (preliminary?) solution, consisting of a vertex shader that is compiled with a certain number of joints ( https://github.com/javagl/JglTF/blob/master/jgltf-model/src/main/resources/pbr.vert#L18 ).

The solution might be backported to glTF 1.0, but the shaders may have to be updated anyhow, to improve the PBR support.

@javagl
Copy link
Owner Author

javagl commented Oct 17, 2017

Crossref: donmccurdy/three-gltf-viewer#50

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

No branches or pull requests

1 participant