summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-01 08:48:44 +0200
committerGitHub <noreply@github.com>2019-08-01 08:48:44 +0200
commita967ece4c783e320119ba39b2a8f4a7e95dc1e3e (patch)
treed7686e24fe9f19a9d279ba433bc7e3c3ce01e1bf
parent10b3f7925b8c0f79852d7462420b6817eecdf944 (diff)
parentc34d75b67845cbd49cbb821bfc9cfa9ed25343dc (diff)
Merge pull request #31009 from Chaosus/vs_fix_outer_product
Fix outerProduct function in visual shaders
-rw-r--r--scene/resources/visual_shader_nodes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index 21ee247b02..a1a29ec950 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -2106,7 +2106,7 @@ String VisualShaderNodeOuterProduct::get_output_port_name(int p_port) const {
}
String VisualShaderNodeOuterProduct::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = outerProduct( " + p_input_vars[0] + ", " + p_input_vars[1] + " );\n";
+ return "\t" + p_output_vars[0] + " = outerProduct( vec4(" + p_input_vars[0] + ", 0.0), vec4(" + p_input_vars[1] + ", 0.0) );\n";
}
VisualShaderNodeOuterProduct::VisualShaderNodeOuterProduct() {