You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
fix-refract-node
This commit is contained in:
@@ -4627,6 +4627,30 @@ String VisualShaderNodeVectorRefract::get_input_port_name(int p_port) const {
|
||||
return String();
|
||||
}
|
||||
|
||||
VisualShaderNodeVectorRefract::PortType VisualShaderNodeVectorRefract::get_input_port_type(int p_port) const {
|
||||
switch (op_type) {
|
||||
case OP_TYPE_VECTOR_2D:
|
||||
if (p_port == 2) {
|
||||
break;
|
||||
}
|
||||
return PORT_TYPE_VECTOR_2D;
|
||||
case OP_TYPE_VECTOR_3D:
|
||||
if (p_port == 2) {
|
||||
break;
|
||||
}
|
||||
return PORT_TYPE_VECTOR_3D;
|
||||
case OP_TYPE_VECTOR_4D:
|
||||
if (p_port == 2) {
|
||||
break;
|
||||
}
|
||||
return PORT_TYPE_VECTOR_4D;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
int VisualShaderNodeVectorRefract::get_output_port_count() const {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1896,6 +1896,7 @@ public:
|
||||
|
||||
virtual int get_input_port_count() const override;
|
||||
virtual String get_input_port_name(int p_port) const override;
|
||||
virtual PortType get_input_port_type(int p_port) const override;
|
||||
|
||||
virtual int get_output_port_count() const override;
|
||||
virtual String get_output_port_name(int p_port) const override;
|
||||
|
||||
Reference in New Issue
Block a user