docs.unity3d.com
    Show / Hide Table of Contents

    Combine Node

    Description

    Creates new vectors from the four inputs R, G, B and A. Output RGBA is a Vector 4 composed of inputs R, G, B and A. Output RGB is a Vector 3 composed of inputs R, G and B. Output RG is a Vector 2 composed of inputs R and G.

    Ports

    Name Direction Type Binding Description
    R Input Float None Defines red channel of output
    G Input Float None Defines green channel of output
    B Input Float None Defines blue channel of output
    A Input Float None Defines alpha channel of output
    RGBA Output Vector 4 None Output value as Vector 4
    RGB Output Vector 3 None Output value as Vector 3
    RG Output Vector 2 None Output value as Vector 2

    Generated Code Example

    The following example code represents one possible outcome of this node.

    void Unity_Combine_float(float R, float G, float B, float A, out float4 RGBA, out float3 RGB, out float2 RG)
    {
        RGBA = float4(R, G, B, A);
        RGB = float3(R, G, B);
        RG = float2(R, G);
    }
    
    In This Article
    • Description
    • Ports
    • Generated Code Example
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023