summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorChaosus <chaosus89@gmail.com>2019-08-01 08:01:29 +0300
committerChaosus <chaosus89@gmail.com>2019-08-01 08:29:05 +0300
commitc34d75b67845cbd49cbb821bfc9cfa9ed25343dc (patch)
tree4722d393cdbf907a7e3286ee925d3cfcad72861e /scene
parent507e41e6986b75a81d66ff82dc5754a6909818e3 (diff)
Fix outerProduct function in visual shaders
Diffstat (limited to 'scene')
-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() {