docs.unity3d.com
Search Results for

    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

    All properties have the following common parameters in addition to those specific to their Data Types.

    Parameter Description
    Name The display name of the property.
    Reference The internal name for the property in the shader. Use this Reference name instead of the display Name when you reference the property in a script.

    If you overwrite this parameter, be aware of the following:
    • If the string doesn't begin with an underscore, Unity automatically adds one.
    • If the string contains any characters that HLSL does not support, Unity removes them.
    • You can revert to the default value: right-click on the Reference field label, and select Reset Reference.
    Precision Sets the data precision mode of the Property. The options are Inherit, Single, Half, and Use Graph Precision.
    For more details, refer to Precision Modes.
    Scope Specifies where you expect to edit the property for materials. The options are:
    • Global: Makes the property editable at a global level, through a C# script only, for all materials that use it. Selecting this option hides or grays out all parameters that relate to the Inspector UI display.
    • Per Material: Makes the property independently editable per material, either through a C# script, or in the Inspector UI if you enable Show In Inspector.
    • Hybrid Per Instance: Has the same effect as Per Material, unless you're using DOTS instancing.
    Show In Inspector Displays the property in the material inspector.
    If you disable this option, it includes an [HideInInspector] attribute to the material property (refer to Properties block reference in ShaderLab for more details).

    Float

    Defines a Float value.

    Parameters specific to Float properties in addition to the common parameters:

    Parameter Description
    Mode Select the UI mode in which you want to display the Property and manipulate its value in the material inspector. You need to define a specific subset of parameters according to the option you select.

    The options are:
    • Default: Displays a scalar input field in the material inspector. Only requires a Default Value.
    • Slider: Defines the Float property in Range mode to display a slider field in the material inspector. Use additional parameters to define the slider range.
    • Integer: Displays an integer input field in the material inspector. Only requires a Default Value.
    Default Value The default value of the Property.
    The value might be either a float or an integer according to the Mode you select.

    Slider

    Additional parameters available when you set the Float property Mode to Slider.

    Parameter Description
    Min The minimum value of the slider range.
    Max The maximum value of the slider range.

    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.

    Parameter Description
    Default Value Sets the initial value of the Property.
    A 2D vector value (Vector2).

    Vector 3

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

    Parameter Description
    Default Value Sets the initial value of the Property.
    A 3D vector value (Vector3).

    Vector 4

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

    Parameter Description
    Default Value Sets the initial value of the Property.
    A 4D vector value (Vector4).

    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.

    Parameter Description
    Default Value Sets the initial value of the Property.
    Mode Selects the color input mode.

    The options are:
    • Default: Allows to select a standard sRGB color.
    • HDR: Allows to select an HDR color and sets its intensity from -10 to 10 exposure stops.

    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.

    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.

    Parameter Description
    Default Value Sets the initial value of the Property.
    A boolean value.

    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.

    Parameter Description
    Default Value Sets the initial value of the Property.
    A texture asset reference.
    Mode Defines the fallback texture Unity uses when none is provided.

    The options are:
    • White: Sets a solid white (1,1,1) texture to ensure full-intensity sampling.
    • Black: Sets a solid black (0,0,0) texture to yield zero contribution.
    • Grey: Sets a mid-grey in sRGB (~0.5) as a neutral fallback.
    • Normal Map: Sets a flat normal value to keep surfaces flat without a normal texture.
    • Linear Grey: Sets a mid-grey in linear color space.
    • Red: Sets a solid red (1,0,0) texture, useful for data expected in the red channel.
    Use Tiling and Offset Toggles the property NoScaleOffset to enable manipulating scale and offset separately from other texture properties; see SplitTextureTransformNode.
    A boolean value.
    Use TexelSize Uses the size of texels expressed in UV space.
    Is HDR Allows any node that samples the texture to automatically decode the sampled value if the texture is stored in an encoded HDR format (for example, dLDR).

    Texture 2D Array

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

    Parameter Description
    Default Value Sets the initial value of the Property.
    A texture asset reference.
    Is HDR Allows any node that samples the texture to automatically decode the sampled value if the texture is stored in an encoded HDR format (for example, dLDR).

    Texture 3D

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

    Parameter Description
    Default Value Sets the initial value of the Property.
    A texture asset reference.
    Is HDR Allows any node that samples the texture to automatically decode the sampled value if the texture is stored in an encoded HDR format (for example, dLDR).

    Cubemap

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

    Parameter Description
    Default Value Sets the initial value of the Property.
    A cubemap asset reference.
    Is HDR Allows any node that samples the texture to automatically decode the sampled value if the texture is stored in an encoded HDR format (for example, dLDR).

    Virtual Texture

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

    Parameter Description
    Layers Manages the collection of layers in the stack.

    The options are:
    • Add (+): Adds a new layer.
    • Remove (-): Removes the selected layer.

    Select the active layer to edit its parameters.
    Layer Name Displays the user-defined name for the selected layer.
    Layer Reference Defines the internal identifier used to reference the selected layer.
    Layer Texture Assigns the default texture asset for the selected layer.
    Layer Texture Type Specifies the expected data type for the selected layer�s texture, which determines import settings and sampling behavior, such as sRGB vs Linear and normal map decoding.

    The options are:
    • Normal tangent space: Encodes per-texel normals relative to the mesh�s tangent basis so surface detail follows UVs and local orientation.
    • Normal object space: Preserves per-texel normals in object coordinates.

    Matrix 2

    Defines a Matrix 2. Matrices do not display in the Inspector window of the material.

    Parameter Description
    Default Value Sets the initial value of the Property.
    A 2�2 matrix value (Matrix2).

    Matrix 3

    Defines a Matrix 3 value. Can't be displayed in the material inspector.

    Parameter Description
    Default Value Sets the initial value of the Property.
    A 3�3 matrix value (Matrix3).

    Matrix 4

    Defines a Matrix 4 value. Can't be displayed in the material inspector.

    Parameter Description
    Default Value Sets the initial value of the Property.
    A 4�4 matrix value (Matrix4).
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)