-
Notifications
You must be signed in to change notification settings - Fork 250
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
Split techniques for primitives that use different attributes #430
Conversation
@lilleyse works as described for input gltf that already has |
I'm not totally sure what the spec would say about that, but it sounds like that model would be invalid.
I think by this point a valid glTF would have already been split already, so the same kmc material wouldn't be used by two primitives with different attributes. |
@@ -325,4 +325,84 @@ describe('processModelMaterialsCommon', function() { | |||
expect(techniqueVec4.parameters.joint.type).toEqual(WebGLConstants.FLOAT_VEC4); | |||
expect(techniqueMat3.parameters.joint.type).toEqual(WebGLConstants.FLOAT_MAT3); | |||
}); | |||
|
|||
it('splits two materials with different attributes', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small thing: I'm reading this spec title as "splitting two materials," like splitting two materials into four materials, instead of something like "splits a material used by meshes with different attributes."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I used your wording.
Thanks @lilleyse! |
Take into account whether a primitive has normals or texture coordinates when deciding whether to split incompatible techniques/materials.
This targets the 1.0 branch.