W3cubDocs

/Godot 3.2

VisualShaderNodeVectorOp

Inherits: VisualShaderNode < Resource < Reference < Object

A vector operator to be used within the visual shader graph.

Description

A visual shader node for use of vector operators. Operates on vector a and vector b.

Properties

Operator operator 0

Enumerations

enum Operator:

  • OP_ADD = 0 --- Adds two vectors.
  • OP_SUB = 1 --- Subtracts a vector from a vector.
  • OP_MUL = 2 --- Multiplies two vectors.
  • OP_DIV = 3 --- Divides vector by vector.
  • OP_MOD = 4 --- Returns the remainder of the two vectors.
  • OP_POW = 5 --- Returns the value of the first parameter raised to the power of the second, for each component of the vectors.
  • OP_MAX = 6 --- Returns the greater of two values, for each component of the vectors.
  • OP_MIN = 7 --- Returns the lesser of two values, for each component of the vectors.
  • OP_CROSS = 8 --- Calculates the cross product of two vectors.
  • OP_ATAN2 = 9 --- Returns the arc-tangent of the parameters.
  • OP_REFLECT = 10 --- Returns the vector that points in the direction of reflection. a is incident vector and b is the normal vector.
  • OP_STEP = 11 --- Vector step operator. Returns 0.0 if a is smaller than b and 1.0 otherwise.

Property Descriptions

Operator operator

Default 0
Setter set_operator(value)
Getter get_operator()

The operator to be used. See Operator for options.

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_visualshadernodevectorop.html