diff options
author | reduz <reduzio@gmail.com> | 2020-10-24 12:15:43 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2020-10-24 15:57:25 -0300 |
commit | 84d734da0e4dc4f0076c61a7178d8ad7b9f3b616 (patch) | |
tree | f5b2f2ec923bf3eb1593531bc3d91c3dc1a1c0a1 /editor/plugins/tile_set_editor_plugin.cpp | |
parent | b67ccf1a6f326c5d4d5fa1cc7cd15eff3573f8f7 (diff) |
Refactored 2D shader and lighting system
-Removed normal/specular properties from nodes
-Create CanvasTexture, which can contain normal/specular channels
-Refactored, optimized and simplified 2D shaders
-Use atlas for light textures.
-Use a shadow atlas for shadow textures.
-Use both items aboves to make light rendering stateless (faster).
-Reorganized uniform sets for more efficiency.
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 684d8f0f10..9c589267fc 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -60,7 +60,6 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) { Sprite2D *mi = Object::cast_to<Sprite2D>(child); Ref<Texture2D> texture = mi->get_texture(); - Ref<Texture2D> normal_map = mi->get_normal_map(); Ref<ShaderMaterial> material = mi->get_material(); if (texture.is_null()) { @@ -75,7 +74,6 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) { } p_library->tile_set_texture(id, texture); - p_library->tile_set_normal_map(id, normal_map); p_library->tile_set_material(id, material); p_library->tile_set_modulate(id, mi->get_modulate()); @@ -2368,7 +2366,6 @@ void TileSetEditor::_select_edited_shape_coord() { void TileSetEditor::_undo_tile_removal(int p_id) { undo_redo->add_undo_method(tileset.ptr(), "create_tile", p_id); undo_redo->add_undo_method(tileset.ptr(), "tile_set_name", p_id, tileset->tile_get_name(p_id)); - undo_redo->add_undo_method(tileset.ptr(), "tile_set_normal_map", p_id, tileset->tile_get_normal_map(p_id)); undo_redo->add_undo_method(tileset.ptr(), "tile_set_texture_offset", p_id, tileset->tile_get_texture_offset(p_id)); undo_redo->add_undo_method(tileset.ptr(), "tile_set_material", p_id, tileset->tile_get_material(p_id)); undo_redo->add_undo_method(tileset.ptr(), "tile_set_modulate", p_id, tileset->tile_get_modulate(p_id)); @@ -3541,7 +3538,6 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const int id = tileset_editor->get_current_tile(); p_list->push_back(PropertyInfo(Variant::NIL, "Selected Tile", PROPERTY_HINT_NONE, "tile_", PROPERTY_USAGE_GROUP)); p_list->push_back(PropertyInfo(Variant::STRING, "tile_name")); - p_list->push_back(PropertyInfo(Variant::OBJECT, "tile_normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "tile_tex_offset")); p_list->push_back(PropertyInfo(Variant::OBJECT, "tile_material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial")); p_list->push_back(PropertyInfo(Variant::COLOR, "tile_modulate")); |