godot icon indicating copy to clipboard operation
godot copied to clipboard

Handle Vector4 default input values in visual shaders

Open AlexeyBond opened this issue 1 year ago • 2 comments

When set_input_port_default_value in a VisualShaderNodeCustom is called with a Vector4 as the second parameter and nothing is connected to the input, shader code generator inserts empty space instead of the default value.

This PR should fix this by making code generator handle 4d vectors the same way as 3d and 2d.

~~I don't yet have an environment set up to properly build and test this, so the changes may be not valid.~~

UPD: Tested the build from github actions. Seems to work fine.

AlexeyBond avatar Apr 18 '24 12:04 AlexeyBond

cc @Chaosus Please take a look.

arkology avatar Apr 18 '24 14:04 arkology

@arkology the relevant teams have been requested, please have some patience

AThousandShips avatar Apr 18 '24 17:04 AThousandShips

Thanks! And congrats for your first merged Godot contribution :tada:

akien-mga avatar Jun 07 '24 21:06 akien-mga