vectorToFloat

convert
vectorToFloat
RayTK
v0.42

Converts a vector value field to a float field, e.g. using one part of the vector.

Parameters

Name Description Regular Handling Read-Only Handling
Enable
Use Part

Which part of the vector to use for the float field.

Semi-Baked Semi-Baked
  • X / Red:
  • Y / Green:
  • Z / Blue:
  • W / Alpha:
  • Length(XY): Use the length of the XY parts of the vector.
  • Length(XYZ): Use the length of the XYZ parts of the vector.
  • Length(XYZW): Use the length of all 4 parts of the vector.
  • Minimum(XY): Minimum of the X and Y.
  • Minimum(XYZ): Minimum of the X, Y, and Z.
  • Minimum(XYZW): Minimum of all 4 parts.
  • Maximum(XY): Maximum of the X and Y.
  • Maximum(XYZ): Maximum of the X, Y, and Z.
  • Maximum(XYZW): Maximum of all 4 parts.
  • Average(XY): Average of X and Y.
  • Average(XYZ): Average of X, Y, and Z.
  • Average(XYZW): Average of all 4 parts.
  • Hue: Treat the vector as an RGB color and get the hue.
  • Saturation: Treat the vector as an RGB color and get the saturation.
  • Value: Treat the vector as an RGB color and get the value (as in HSV).
  • Luminance: Treat the vector as an RGB color and get the luminance.
  • Sum(XY): Add the X and Y parts.
  • Sum(XYZ): Add the X, Y, and Z parts.
  • Sum(XYZW): Add all 4 parts.

Inputs

  • definition_in: (required)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: vec4