vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
482 stars 77 forks source link

[BUG] IOR is not preserved when using Scene.ToGltf2() #246

Closed PassiveModding closed 2 months ago

PassiveModding commented 2 months ago

Describe the bug IOR values are not transferred when running Scene.ToGltf2()

This happens because the value of the field is set in https://github.com/vpenades/SharpGLTF/blob/f5cd805711f76596a77a71de9cba4717e0edd159/src/SharpGLTF.Toolkit/Schema2/MaterialExtensions.cs#L393 happens before extensions are cleared for specific shader styles.

To Reproduce

please complete the following information:

Potential solutions

vpenades commented 2 months ago

thanks, I'll look into it