diff options
-rw-r--r-- | scene/2d/mesh_instance_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/mesh_instance_2d.h | 1 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/scene/2d/mesh_instance_2d.cpp b/scene/2d/mesh_instance_2d.cpp index 15008390b7..58bff97da9 100644 --- a/scene/2d/mesh_instance_2d.cpp +++ b/scene/2d/mesh_instance_2d.cpp @@ -96,6 +96,10 @@ Rect2 MeshInstance2D::_edit_get_rect() const { return Node2D::_edit_get_rect(); } + +bool MeshInstance2D::_edit_use_rect() const { + return mesh.is_valid(); +} #endif MeshInstance2D::MeshInstance2D() { diff --git a/scene/2d/mesh_instance_2d.h b/scene/2d/mesh_instance_2d.h index adfda4cf7f..f94d53da7d 100644 --- a/scene/2d/mesh_instance_2d.h +++ b/scene/2d/mesh_instance_2d.h @@ -48,6 +48,7 @@ protected: public: #ifdef TOOLS_ENABLED virtual Rect2 _edit_get_rect() const override; + virtual bool _edit_use_rect() const override; #endif void set_mesh(const Ref<Mesh> &p_mesh); diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp index a1c3481ed6..d05cfdc386 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp @@ -657,6 +657,10 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin actions.render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_BLINN\n"; } + actions.custom_samplers["SCREEN_TEXTURE"] = "material_samplers[3]"; // linear filter with mipmaps + actions.custom_samplers["DEPTH_TEXTURE"] = "material_samplers[3]"; + actions.custom_samplers["NORMAL_ROUGHNESS_TEXTURE"] = "material_samplers[1]"; // linear filter + actions.render_mode_defines["specular_blinn"] = "#define SPECULAR_BLINN\n"; actions.render_mode_defines["specular_phong"] = "#define SPECULAR_PHONG\n"; actions.render_mode_defines["specular_toon"] = "#define SPECULAR_TOON\n"; |