jkuhlmann / cgltf

:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99
MIT License
1.42k stars 135 forks source link

Add support for KHR_materials_anisotropy #205

Closed abwood closed 1 year ago

abwood commented 1 year ago

This PR is following the evolution of the KHR_materials_anisotropy specification.

This specification is still in draft form, so this PR is not yet ready for merge. Wanted a solution available for implementers to assess in their own renderers.

zeux commented 1 year ago

Looks like the extension just got merged into glTF mainline. I looked at the change and it seems like it reflects the final version of the spec?

zeux commented 1 year ago

I've tested this as part of https://github.com/zeux/meshoptimizer/pull/556 and it seems to work (the parsing part at least, gltfpack doesn't use cgltf_write)

zeux commented 1 year ago

Oh, this is missing calls to cgltf_free_texture_view in cgltf_free. With #118 we will be able to remove those but they are necessary for now.

zeux commented 1 year ago

Note, the failing build is unrelated to this change - fixed by #216.

abwood commented 1 year ago

Great comments, thanks for reviewing @zeux!

jkuhlmann commented 1 year ago

@abwood Would you mind merging in master again?