Merge pull request #31009 from Chaosus/vs_fix_outer_product

Fix outerProduct function in visual shaders
This commit is contained in:
Rémi Verschelde 2019-08-01 08:48:44 +02:00 committed by GitHub
commit a967ece4c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {