summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_scene.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-06-24 08:58:27 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-06-24 08:58:27 -0300
commit0cac32910a1026517b9fc782d72824c80baf676e (patch)
tree67b03361c481f24eefabfdc2eb55ab0cdf86b3e9 /servers/visual/visual_server_scene.cpp
parent6ba1e4677ba15992c750bddffcb9f1eacd1558a1 (diff)
-Restored support for Canvas BG mode on Environment
-Improved ease of use of WorldEnvironment (no longer extends Spatial) -2D editor viewport can now work in HDR!
Diffstat (limited to 'servers/visual/visual_server_scene.cpp')
-rw-r--r--servers/visual/visual_server_scene.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 6d1f698a5c..fb1c66d0b9 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -2162,6 +2162,18 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
VSG::scene_render->render_scene(p_cam_transform, p_cam_projection, p_cam_orthogonal, (RasterizerScene::InstanceBase **)instance_cull_result, cull_count, light_instance_cull_result, light_cull_count + directional_light_count, reflection_probe_instance_cull_result, reflection_probe_cull_count, environment, p_shadow_atlas, scenario->reflection_atlas, p_reflection_probe, p_reflection_probe_pass);
}
+void VisualServerScene::render_empty_scene(RID p_scenario, RID p_shadow_atlas) {
+
+ Scenario *scenario = scenario_owner.getornull(p_scenario);
+
+ RID environment;
+ if (scenario->environment.is_valid())
+ environment = scenario->environment;
+ else
+ environment = scenario->fallback_environment;
+ VSG::scene_render->render_scene(Transform(), CameraMatrix(), true, NULL, 0, NULL, 0, NULL, 0, environment, p_shadow_atlas, scenario->reflection_atlas, RID(), 0);
+}
+
bool VisualServerScene::_render_reflection_probe_step(Instance *p_instance, int p_step) {
InstanceReflectionProbeData *reflection_probe = static_cast<InstanceReflectionProbeData *>(p_instance->base_data);