summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/resources/material.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 31b73100b9..090e6bdcb0 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3202,6 +3202,8 @@ Viewport::Viewport() {
gui.drag_attempted = false;
gui.canvas_sort_index = 0;
gui.roots_order_dirty = false;
+ gui.mouse_focus = NULL;
+ gui.last_mouse_focus = NULL;
msaa = MSAA_DISABLED;
hdr = true;
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 619af375da..190dc707c4 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -830,7 +830,7 @@ void SpatialMaterial::_update_shader() {
code += "\tALPHA = albedo.a * albedo_tex.a;\n";
}
- if (!VisualServer::get_singleton()->is_low_end() && proximity_fade_enabled) {
+ if (proximity_fade_enabled) {
code += "\tfloat depth_tex = textureLod(DEPTH_TEXTURE,SCREEN_UV,0.0).r;\n";
code += "\tvec4 world_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV*2.0-1.0,depth_tex*2.0-1.0,1.0);\n";
code += "\tworld_pos.xyz/=world_pos.w;\n";