Merge pull request #41123 from lawnjelly/octree_fix
Optimize octree and fix leak
This commit is contained in:
commit
66cbcc1b7e
6 changed files with 1799 additions and 1352 deletions
1377
core/math/octree.h
1377
core/math/octree.h
File diff suppressed because it is too large
Load diff
1763
core/math/octree_definition.inc
Normal file
1763
core/math/octree_definition.inc
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1174,6 +1174,10 @@
|
|||
<member name="rendering/quality/shadows/filter_mode.mobile" type="int" setter="" getter="" default="0">
|
||||
Lower-end override for [member rendering/quality/shadows/filter_mode] on mobile devices, due to performance concerns or driver support.
|
||||
</member>
|
||||
<member name="rendering/quality/spatial_partitioning/render_tree_balance" type="float" setter="" getter="" default="0.17">
|
||||
The rendering octree balance can be changed to favor smaller ([code]0[/code]), or larger ([code]1[/code]) branches.
|
||||
Larger branches can increase performance significantly in some projects.
|
||||
</member>
|
||||
<member name="rendering/quality/subsurface_scattering/follow_surface" type="bool" setter="" getter="" default="false">
|
||||
Improves quality of subsurface scattering, but cost significantly increases.
|
||||
</member>
|
||||
|
|
|
@ -260,6 +260,7 @@ RID VisualServerScene::scenario_create() {
|
|||
RID scenario_rid = scenario_owner.make_rid(scenario);
|
||||
scenario->self = scenario_rid;
|
||||
|
||||
scenario->octree.set_balance(GLOBAL_GET("rendering/quality/spatial_partitioning/render_tree_balance"));
|
||||
scenario->octree.set_pair_callback(_instance_pair, this);
|
||||
scenario->octree.set_unpair_callback(_instance_unpair, this);
|
||||
scenario->reflection_probe_shadow_atlas = VSG::scene_render->shadow_atlas_create();
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
VS::ScenarioDebugMode debug;
|
||||
RID self;
|
||||
|
||||
Octree<Instance, true> octree;
|
||||
Octree_CL<Instance, true> octree;
|
||||
|
||||
List<Instance *> directional_lights;
|
||||
RID environment;
|
||||
|
|
|
@ -2432,6 +2432,10 @@ VisualServer::VisualServer() {
|
|||
|
||||
GLOBAL_DEF("rendering/quality/filters/use_nearest_mipmap_filter", false);
|
||||
|
||||
const char *sz_balance_render_tree = "rendering/quality/spatial_partitioning/render_tree_balance";
|
||||
GLOBAL_DEF(sz_balance_render_tree, 0.17f);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(sz_balance_render_tree, PropertyInfo(Variant::REAL, sz_balance_render_tree, PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
|
||||
|
||||
GLOBAL_DEF("rendering/batching/options/use_batching", true);
|
||||
GLOBAL_DEF_RST("rendering/batching/options/use_batching_in_editor", true);
|
||||
GLOBAL_DEF("rendering/batching/options/single_rect_fallback", false);
|
||||
|
|
Loading…
Reference in a new issue