summaryrefslogtreecommitdiff
path: root/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-11-26 15:48:14 +0100
committerGitHub <noreply@github.com>2020-11-26 15:48:14 +0100
commit0a54dcb54f7e7855c7eb0b63b3cccf5d9d0251ea (patch)
tree629b00592dcdc22de5e18afd412ad9cfa60ea7c2 /servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
parent4e5625ce30364855075c4ac6b7f12575b2964122 (diff)
parent1bcf3c305bc3d7b0eb293247c08a1c3917eee9b2 (diff)
Merge pull request #43886 from reduz/sdf-2d
Implement Signed Distance Fields for 2D shaders
Diffstat (limited to 'servers/rendering/rasterizer_rd/shader_compiler_rd.cpp')
-rw-r--r--servers/rendering/rasterizer_rd/shader_compiler_rd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp b/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
index 08f4eb6aa0..df5513435a 100644
--- a/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
+++ b/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp
@@ -1072,6 +1072,11 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
} else if (onode->op == SL::OP_CONSTRUCT) {
code += String(vnode->name);
} else {
+ if (p_actions.usage_flag_pointers.has(vnode->name) && !used_flag_pointers.has(vnode->name)) {
+ *p_actions.usage_flag_pointers[vnode->name] = true;
+ used_flag_pointers.insert(vnode->name);
+ }
+
if (internal_functions.has(vnode->name)) {
code += vnode->name;
is_texture_func = texture_functions.has(vnode->name);