Fix glTF light orientation

This commit is contained in:
Jan Hohenheim 2025-07-14 03:30:25 +02:00
parent 33bed5dd70
commit 5b100f3a63
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ pub(crate) trait ConvertCameraCoordinates {
/// - up: Y
/// - right: X
///
/// The same convention is used for lights.
/// See <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#view-matrix>
fn convert_camera_coordinates(self) -> Self;
}

View File

@ -45,7 +45,7 @@ pub(crate) fn node_transform(node: &Node, convert_coordinates: bool) -> Transfor
},
};
if convert_coordinates {
if node.camera().is_some() {
if node.camera().is_some() || node.light().is_some() {
transform.convert_camera_coordinates()
} else {
transform.convert_coordinates()