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

Implement support for KHR_materials_dispersion #246

Closed zeux closed 6 months ago

zeux commented 6 months ago

This extension is structurally similar to KHR_materials_ior in that it's just a float, no textures or any other parameters.

Specification: https://github.com/KhronosGroup/gltf/tree/main/extensions/2.0/Khronos/KHR_materials_dispersion

Tested end-to-end in gltfpack (https://github.com/zeux/meshoptimizer/pull/660) plus tested via test_write_glb by taking the example from https://github.com/KhronosGroup/glTF/pull/2340#issuecomment-1850997118, using test_write_glb to convert it to a new .glb file and loading the resulting file in Babylon.JS sandbox.