Skip to content

Commit

Permalink
gltfio: change instancing behavior for punctual lights
Browse files Browse the repository at this point in the history
  • Loading branch information
prideout committed Sep 16, 2022
1 parent adde936 commit a05f9c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ A new header is inserted each time a *tag* is created.

## main branch

- gltfio: punctual lights are now duplicated when adding new asset instances
- gltfio: allow zero-instance assets
- gltfio: fix regression with meshes that have no material
- gltfio: fix regression with recomputeBoundingBoxes()
Expand Down
3 changes: 1 addition & 2 deletions libs/gltfio/src/AssetLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ FFilamentInstance* FAssetLoader::createInstance(const cgltf_data* srcAsset) {

importSkins(mAsset, instance, srcAsset);

// This needs to stay near the end of the method to allow detection of the first instance.
mAsset->mInstances.push_back(instance);

// Bounding boxes are not shared because users might call recomputeBoundingBoxes() which can
Expand Down Expand Up @@ -572,7 +571,7 @@ void FAssetLoader::recurseEntities(const cgltf_data* srcAsset, const cgltf_node*
}
}

if (node->light && mAsset->mInstances.empty()) {
if (node->light ) {
createLight(node->light, entity);
}

Expand Down

0 comments on commit a05f9c1

Please sign in to comment.