summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2019-02-22 11:32:37 -0300
committerJuan Linietsky <juan@godotengine.org>2019-02-22 11:35:39 -0300
commitaab8f443f90df21f84dd306600db0c5d1378ade9 (patch)
tree899a0eb0955a95fe1ea2313f386eb889519f9503 /scene
parent8b9ec8bc8820c0756544ecce45d8e867b7aad17b (diff)
-Support DEPTH_TEXTURE in GLES2, fixes #25106
-Fix use of transparent framebuffers in GLES2 -Fix use of ambient color clearing in GLES2 when no environment exists.
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/material.cpp2
1 files changed, 1 insertions, 1 deletions
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";