1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Merge pull request #46130 from lawnjelly/portals

Portal occlusion culling [3.4]
This commit is contained in:
Rémi Verschelde
2021-07-14 13:38:01 +02:00
committed by GitHub
78 changed files with 10865 additions and 45 deletions

View File

@@ -2231,6 +2231,11 @@ RID VisualServer::instance_create2(RID p_base, RID p_scenario) {
RID instance = instance_create();
instance_set_base(instance, p_base);
instance_set_scenario(instance, p_scenario);
// instance_create2 is used mainly by editor instances.
// These should not be culled by the portal system when it is active, so we set their mode to global,
// for frustum culling only.
instance_set_portal_mode(instance, VisualServer::INSTANCE_PORTAL_MODE_GLOBAL);
return instance;
}