You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Portal occlusion culling
Adds support for occlusion culling via rooms and portals.
This commit is contained in:
@@ -2229,6 +2229,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user