1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix #19507 Not emitted particles affects performance

This commit is contained in:
malbach
2018-06-25 16:07:14 +02:00
parent 682c2f2493
commit cef8d355d2
12 changed files with 28 additions and 4 deletions

View File

@@ -1869,10 +1869,12 @@ void VisualServerScene::_prepare_scene(const Transform p_cam_transform, const Ca
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(ins->base_data);
if (ins->base_type == VS::INSTANCE_PARTICLES) {
//particles visible? process them
VSG::storage->particles_request_process(ins->base);
//particles visible? request redraw
VisualServerRaster::redraw_request();
if (VSG::storage->particles_get_emitting(ins->base) || !VSG::storage->particles_get_inactive(ins->base)) {
//particles visible? process them
VSG::storage->particles_request_process(ins->base);
//particles visible? request redraw
VisualServerRaster::redraw_request();
}
}
if (geom->lighting_dirty) {