summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorQbieShay <cislaghi.ilaria@gmail.com>2018-10-06 14:59:42 +0200
committerQbieShay <cislaghi.ilaria@gmail.com>2018-10-06 19:34:50 +0200
commitac04e14a51c3146d4e8dd4fc61e67fa4b32981ba (patch)
treeb2d0095ec8621ece82dfcff4a63e8074469b4637 /servers/visual
parentc73043c66b3e04ee82e5cd2f0b54ebc3ab43ac69 (diff)
Added the ability to write to gl_FragDepth. It doesn't affect the depth prepass.
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/shader_types.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index 57e8d86468..69acf52e17 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -109,6 +109,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["EMISSION"] = ShaderLanguage::TYPE_VEC3;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["DEPTH_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["DEPTH"] = ShaderLanguage::TYPE_FLOAT;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["POINT_COORD"] = constt(ShaderLanguage::TYPE_VEC2);
shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT;