docs.unity3d.com
    Show / Hide Table of Contents

    Property Types

    Description

    Property Types are the types of Property than can be defined on the Blackboard for use in the Graph. These Properties are exposed to the Inspector for Materials that use the shader.

    Each property has an associated Data Type. See Data Types for more information.

    Common Parameters

    In addition to values specific to their Data Types, most properties have the following common parameters.

    Name Type Description
    Display Name String The display name of the property
    Exposed Boolean If true this property will be exposed on the material inspector
    Reference Name String The internal name used for the property inside the shader
    Override Property Declaration Boolean An advanced option to enable explicit control of the shader declaration for this property
    Shader Declaration Enumeration Controls the shader declaration of this property

    NOTE: If you overwrite the Reference Name parameter be aware of the following conditions:

    • If your Reference Name does not begin with an underscore, one will be automatically appended.
    • If your Reference Name contains any characters which are unsupported in HLSL they will be removed.
    • You can revert to the default Reference Name by right clicking on it and selecting Reset Reference.

    Float

    Defines a Float value.

    Data Type Modes
    Float Default, Slider, Integer

    Default

    Displays a scalar input field in the material inspector.

    Field Type Description
    Default Float The default value of the Property.

    Slider

    Displays a slider field in the material inspector.

    Field Type Description
    Default Float The default value of the Property.
    Min Float The minimum value of the slider.
    Max Float The maximum value of the slider.

    Integer

    Displays an integer input field in the material inspector.

    Field Type Description
    Default Integer The default value of the Property.

    Vector 2

    Defines a Vector 2 value. Displays a Vector 4 input field in the material inspector, where the z and w components are not used.

    Data Type Modes
    Vector 2
    Field Type Description
    Default Vector 2 The default value of the Property.

    Vector 3

    Defines a Vector 3 value. Displays a Vector 4 input field in the material inspector, where the w component is not used.

    Data Type Modes
    Vector 3
    Field Type Description
    Default Vector 3 The default value of the Property.

    Vector 4

    Defines a Vector 4 value. Displays a Vector 4 input field in the material inspector.

    Data Type Modes
    Vector 4
    Field Type Description
    Default Vector 4 The default value of the Property.

    Color

    Defines a Color value. If the Property Inspector displays Main Color, this is the Main Color for the shader. To select or deselect this node as the Main Color, right-click it in the graph or Blackboard and select Set as Main Color or Clear Main Color. Corresponds to the MainColor ShaderLab Properties attribute.

    Data Type Modes
    Color Default, HDR

    Default

    Displays an sRGB color field in the material inspector.

    Field Type Description
    Default Vector 4 The default value of the Property.

    HDR

    Displays an HDR color field in the material inspector.

    Field Type Description
    Default Vector 4 The default value of the Property.

    NOTE: In versions prior to 10.0, Shader Graph didn't correct HDR colors for the project colorspace. Version 10.0 corrected this behavior. HDR color properties that you created with older versions maintain the old behavior, but you can use the Graph Inspector to upgrade them. To mimic the old behavior in a gamma space project, you can use the Colorspace Conversion Node to convert a new HDR Color property from RGB to Linear space.

    Texture 2D

    Defines a Texture 2D value. Displays an object field of type Texture in the material inspector. If the Property Inspector displays Main Texture, this is the Main Texture for the shader. To select or deselect this node as the Main Texture, right-click on it in the graph or Blackboard and select Set as Main Texture or Clear Main Texture. Corresponds to the MainTexture ShaderLab Properties attribute.

    Data Type Modes
    Texture White, Black, Grey, Bump
    Field Type Description
    Default Texture The default value of the Property.
    Use Tiling and Offset Boolean When set to false, activates the property NoScaleOffset, to enable manipulation of scale and offset separately from other texture properties. See SplitTextureTransformNode.

    Texture 3D

    Defines a Texture 3D value. Displays an object field of type Texture 3D in the material inspector.

    Data Type Modes
    Texture
    Field Type Description
    Default Texture The default value of the Property.

    Texture 2D Array

    Defines a Texture 2D Array value. Displays an object field of type Texture 2D Array in the material inspector.

    Data Type Modes
    Texture
    Field Type Description
    Default Texture The default value of the Property.

    Cubemap

    Defines a Cubemap value. Displays an object field of type Texture in the material inspector.

    Data Type Modes
    Cubemap
    Field Type Description
    Default Cubemap The default value of the Property.

    Virtual Texture

    Defines a Texture Stack, which appears as object fields of type Texture in the Material Inspector. The number of fields correspond to the number of layers in the property.

    Data Type Modes
    Virtual Texture
    Field Type Description
    Default Texture The default value of the Property.

    Boolean

    Defines a Boolean value. Displays a ToggleUI field in the material inspector. Note that internally to the shader this value is a Float. The Boolean type in Shader Graph is merely for usability.

    Data Type Modes
    Boolean
    Field Type Description
    Default Boolean The default value of the Property.
    Back to top
    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