Color Node | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Color Node

    Description

    Defines a constant Vector 4 value in the shader using a Color field. Can be converted to a Color type Property via the Node's context menu. The value of the Mode parameter will also respected when generating the Property.

    Ports

    Name Direction Type Binding Description
    Out Output Vector 4 None Output value

    Controls

    Name Type Options Description
    Color Defines the output value.
    Mode Dropdown Default, HDR Sets properties of the Color field

    Generated Code Example

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

    float4 _Color = IsGammaSpace() ? float4(1, 2, 3, 4) : float4(SRGBToLinear(float3(1, 2, 3)), 4);
    
    Back to top Copyright © 2015-2018 Unity
    Generated by DocFX