From a1f715a4da71fbc2b7d6fad68624bf8b22c6da17 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 2 Mar 2015 00:54:10 -0300 Subject: support for 2D shadow casters Added support for 2D shadow casters. *DANGER* Shaders in CanvasItem CHANGED, if you are using shader in a CanvasItem and pull this, you will lose them. Shaders now work through a 2D material system similar to 3D. If you don't want to lose the 2D shader code, save the shader as a .shd, then create a material in CanvasItem and re-assign the shader. --- tools/editor/editor_node.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index cc1a05f7d3..3d42867d9a 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -90,6 +90,7 @@ #include "plugins/baked_light_editor_plugin.h" #include "plugins/polygon_2d_editor_plugin.h" #include "plugins/navigation_polygon_editor_plugin.h" +#include "plugins/light_occluder_2d_editor_plugin.h" // end #include "tools/editor/io_plugins/editor_texture_import_plugin.h" #include "tools/editor/io_plugins/editor_scene_import_plugin.h" @@ -4115,6 +4116,7 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( PathEditorPlugin(this) ) ); add_editor_plugin( memnew( BakedLightEditorPlugin(this) ) ); add_editor_plugin( memnew( Polygon2DEditorPlugin(this) ) ); + add_editor_plugin( memnew( LightOccluder2DEditorPlugin(this) ) ); add_editor_plugin( memnew( NavigationPolygonEditorPlugin(this) ) ); for(int i=0;i Date: Mon, 16 Mar 2015 00:47:37 -0300 Subject: New option to send canvas to render buffer allows to use 3D environment effects for post processing such as Glow, Bloom, HDR, etc. in 2D. --- tools/editor/editor_node.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 3d42867d9a..5e571373ea 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -218,6 +218,7 @@ void EditorNode::_notification(int p_what) { } if (p_what==NOTIFICATION_ENTER_TREE) { + //MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata"); get_tree()->set_editor_hint(true); get_tree()->get_root()->set_as_audio_listener(false); @@ -231,6 +232,8 @@ void EditorNode::_notification(int p_what) { VisualServer::get_singleton()->viewport_set_hide_scenario(get_scene_root()->get_viewport(),true); VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport(),true); + VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(),true); + _editor_select(1); if (defer_load_scene!="") { @@ -3412,6 +3415,8 @@ EditorNode::EditorNode() { scene_root = memnew( Viewport ); + + //scene_root_base->add_child(scene_root); scene_root->set_meta("_editor_disable_input",true); VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport(),true); -- cgit v1.2.3