You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #10908 from hpvb/fix-unused-variables
Fix unused variable warnings
This commit is contained in:
@@ -151,8 +151,6 @@ void *VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
|
||||
} else if (B->base_type == VS::INSTANCE_GI_PROBE && A->base_type == VS::INSTANCE_LIGHT) {
|
||||
|
||||
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(B->base_data);
|
||||
InstanceLightData *light = static_cast<InstanceLightData *>(A->base_data);
|
||||
|
||||
return gi_probe->lights.insert(A);
|
||||
}
|
||||
|
||||
@@ -211,8 +209,6 @@ void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance
|
||||
} else if (B->base_type == VS::INSTANCE_GI_PROBE && A->base_type == VS::INSTANCE_LIGHT) {
|
||||
|
||||
InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(B->base_data);
|
||||
InstanceLightData *light = static_cast<InstanceLightData *>(A->base_data);
|
||||
|
||||
Set<Instance *>::Element *E = reinterpret_cast<Set<Instance *>::Element *>(udata);
|
||||
|
||||
gi_probe->lights.erase(E);
|
||||
@@ -2130,7 +2126,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
|
||||
int success_count = 0;
|
||||
|
||||
uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
// uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
|
||||
for (int i = 0; i < p_leaf_count; i++) {
|
||||
|
||||
@@ -2183,14 +2179,15 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
success_count++;
|
||||
}
|
||||
}
|
||||
//print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
//print_line("valid cells: " + itos(success_count));
|
||||
|
||||
// print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
// print_line("valid cells: " + itos(success_count));
|
||||
|
||||
} break;
|
||||
case VS::LIGHT_OMNI:
|
||||
case VS::LIGHT_SPOT: {
|
||||
|
||||
uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
// uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
|
||||
Vector3 light_pos = light_cache.transform.origin;
|
||||
Vector3 spot_axis = -light_cache.transform.basis.get_axis(2).normalized();
|
||||
@@ -2289,8 +2286,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
light->energy[2] += int32_t(light_b * att * ((cell->albedo) & 0xFF) / 255.0);
|
||||
}
|
||||
}
|
||||
//print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
|
||||
// print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
@@ -2702,18 +2698,17 @@ void VisualServerScene::render_probes() {
|
||||
} break;
|
||||
case GI_UPDATE_STAGE_UPLOADING: {
|
||||
|
||||
uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
// uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
|
||||
for (int i = 0; i < (int)probe->dynamic.mipmaps_3d.size(); i++) {
|
||||
|
||||
int mmsize = probe->dynamic.mipmaps_3d[i].size();
|
||||
PoolVector<uint8_t>::Read r = probe->dynamic.mipmaps_3d[i].read();
|
||||
VSG::storage->gi_probe_dynamic_data_update(probe->dynamic.probe_data, 0, probe->dynamic.grid_size[2] >> i, i, r.ptr());
|
||||
}
|
||||
|
||||
probe->dynamic.updating_stage = GI_UPDATE_STAGE_CHECK;
|
||||
|
||||
//print_line("UPLOAD TIME: "+rtos((OS::get_singleton()->get_ticks_usec()-us)/1000000.0));
|
||||
// print_line("UPLOAD TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user