summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2019-05-21 00:37:13 +1000
committerBastiaan Olij <mux213@gmail.com>2019-05-21 20:07:46 +1000
commit3ea778e66e0cb19412831db25171d951e430b58f (patch)
treedbd6ce5f5ef9d5fad11dab17d25c133684f01147 /servers/visual
parent6110bdee138febf3b04b47bc15b834bda7b99d52 (diff)
Implement shadow to opacity
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/shader_types.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index 8fd5dfc738..bc6010117c 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -147,6 +147,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].functions["light"].built_ins["DIFFUSE_LIGHT"] = ShaderLanguage::TYPE_VEC3;
shader_modes[VS::SHADER_SPATIAL].functions["light"].built_ins["SPECULAR_LIGHT"] = ShaderLanguage::TYPE_VEC3;
shader_modes[VS::SHADER_SPATIAL].functions["light"].built_ins["OUTPUT_IS_SRGB"] = constt(ShaderLanguage::TYPE_BOOL);
+ shader_modes[VS::SHADER_SPATIAL].functions["light"].built_ins["ALPHA"] = ShaderLanguage::TYPE_FLOAT;
shader_modes[VS::SHADER_SPATIAL].functions["light"].can_discard = true;
@@ -187,6 +188,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].modes.push_back("shadows_disabled");
shader_modes[VS::SHADER_SPATIAL].modes.push_back("ambient_light_disabled");
+ shader_modes[VS::SHADER_SPATIAL].modes.push_back("shadow_to_opacity");
shader_modes[VS::SHADER_SPATIAL].modes.push_back("vertex_lighting");