Merge pull request #68477 from dzil123/visual_shader_ufunc_input_fix

Fixes https://github.com/godotengine/godot/issues/68463
This commit is contained in:
Yuri Rubinsky 2022-11-12 06:50:35 +03:00 committed by GitHub
commit 6521eccaae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3108,9 +3108,9 @@ void VisualShaderNodeUVFunc::set_function(VisualShaderNodeUVFunc::Function p_fun
return;
}
if (p_func == FUNC_PANNING) {
set_input_port_default_value(2, Vector2()); // offset
set_input_port_default_value(2, Vector2(), get_input_port_default_value(2)); // offset
} else { // FUNC_SCALING
set_input_port_default_value(2, Vector2(0.5, 0.5)); // pivot
set_input_port_default_value(2, Vector2(0.5, 0.5), get_input_port_default_value(2)); // pivot
}
func = p_func;
emit_changed();