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

GLTF: Don't write unused light properties #101271

Merged

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Jan 8, 2025

https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual

When exporting a glTF light in Godot, it always writes several properties even when it does not need to. Per the above spec, most of these properties have default values, only "type" is required. Also, we are not supposed to write the range when exporting directional lights, and glTF-Validator produces a note about the property being unused:

Screenshot 2025-01-08 at 12 29 27 AM

Note: This only affects exporting glTF files, it doesn't break compatibility at all for importing.

I'm putting this on the 4.4 milestone because this is a very minor fix.

@aaronfranke aaronfranke added this to the 4.4 milestone Jan 8, 2025
@aaronfranke aaronfranke requested a review from a team as a code owner January 8, 2025 08:40
@aaronfranke aaronfranke force-pushed the gltf-directional-light-no-range branch from db8adb8 to 01a26c5 Compare January 13, 2025 22:34
@akien-mga akien-mga merged commit e8c5d99 into godotengine:master Jan 14, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the gltf-directional-light-no-range branch January 14, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants