Improve Performance in Scenes With Many Lights #14

Merged
SeanOMik merged 8 commits from bugfix/many-lights-poor-performance into main 2024-04-24 23:55:16 +00:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit 3c73e1d7e2 - Show all commits

View File

@ -466,8 +466,10 @@ impl Renderer for BasicRenderer {
if let Some((scene_han, scene_epoch)) = scene_pair { if let Some((scene_han, scene_epoch)) = scene_pair {
if let Some(scene) = scene_han.data_ref() { if let Some(scene) = scene_han.data_ref() {
if scene_epoch == last_epoch {
let view = scene.world().view::<(Entities, &mut WorldTransform, &Transform, Not<Has<RelationOriginComponent<ChildOf>>>)>(); let view = scene.world().view::<(Entities, &mut WorldTransform, &Transform, Not<Has<RelationOriginComponent<ChildOf>>>)>();
lyra_scene::system_update_world_transforms(scene.world(), view).unwrap(); lyra_scene::system_update_world_transforms(scene.world(), view).unwrap();
}
let interpo_pos = self.interpolate_transforms(now_inst, last_epoch, entity, &transform, transform_epoch); let interpo_pos = self.interpolate_transforms(now_inst, last_epoch, entity, &transform, transform_epoch);