docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Eye

    Use the Eye Master Stack to render custom physically based eye Material in the High Definition Render Pipeline (HDRP). It models a two-layer material, in which the first layer describes the cornea and fluids on the surface, and the second layer describes the sclera and the iris, visible through the first layer. It supports various effects, such as cornea refraction, caustics, pupil dilation, limbal darkening, and subsurface scattering.

    Creating an Eye Shader Graph

    To create an Eye material in Shader Graph, use one of the following methods:

    • Modify an existing Shader Graph:

      1. Open the Shader Graph in the Shader Editor.
      2. In Graph Settings, select the HDRP Target. If there isn't one, go to Active Targets, click the Plus button, and select HDRP.
      3. In the Material drop-down, select Eye.
    • Create a new Shader Graph:

      • Go to Assets > Create > Shader Graph > HDRP and click Eye Shader Graph.

    Contexts

    This Master Stack material type has its own set of Graph Settings. Because of the relationship between settings and Blocks, this has consequences on which Blocks are relevant to the Graph. This section contains information on the Blocks this Master Stack material type adds by default, and which Blocks set properties for this Master Stack material type's Graph Settings.

    For more information about the relationship between Graph Settings and Blocks, see Contexts and Blocks.

    Vertex Context

    Default

    When you create a new Eye Master Stack, the Vertex Context contains the following Blocks by default:

    [!include[](snippets/shader-graph-blocks/vertex-position.md)] [!include[](snippets/shader-graph-blocks/vertex-normal.md)] [!include[](snippets/shader-graph-blocks/vertex-tangent.md)]
    Property Description Setting Dependency Default Value

    Relevant

    Depending on the Graph Settings you use, Shader Graph can add the following Blocks to the Vertex Context:

    [!include[](snippets/shader-graph-blocks/tessellation-factor.md)] [!include[](snippets/shader-graph-blocks/tessellation-displacement.md)]
    Property Description Setting Dependency Default Value

    Fragment Context

    Default

    When you create a new Eye Master Stack, the Fragment Context contains the following Blocks by default:

    [!include[](snippets/shader-graph-blocks/base-color.md)] [!include[](snippets/shader-graph-blocks/normal-tangent-space.md)] [!include[](snippets/shader-graph-blocks/bent-normal.md)] [!include[](snippets/shader-graph-blocks/smoothness.md)] [!include[](snippets/shader-graph-blocks/eye-ior.md)] [!include[](snippets/shader-graph-blocks/ambient-occlusion.md)] [!include[](snippets/shader-graph-blocks/mask.md)] [!include[](snippets/shader-graph-blocks/emission.md)] [!include[](snippets/shader-graph-blocks/alpha.md)]
    Property Description Setting Dependency Default Value

    Relevant

    Depending on the Graph Settings you use, Shader Graph can add the following Blocks to the Fragment Context:

    [!include[](snippets/shader-graph-blocks/alpha-clip-threshold.md)] [!include[](snippets/shader-graph-blocks/alpha-clip-threshold-depth-postpass.md)] [!include[](snippets/shader-graph-blocks/alpha-clip-threshold-depth-prepass.md)] [!include[](snippets/shader-graph-blocks/alpha-clip-threshold-shadow.md)] [!include[](snippets/shader-graph-blocks/baked-back-gi.md)] [!include[](snippets/shader-graph-blocks/baked-gi.md)] [!include[](snippets/shader-graph-blocks/depth-offset.md)] [!include[](snippets/shader-graph-blocks/diffusion-profile.md)] [!include[](snippets/shader-graph-blocks/iris-normal-object-space.md)] [!include[](snippets/shader-graph-blocks/iris-normal-tangent-space.md)] [!include[](snippets/shader-graph-blocks/iris-normal-world-space.md)] [!include[](snippets/shader-graph-blocks/normal-object-space.md)] [!include[](snippets/shader-graph-blocks/normal-world-space.md)] [!include[](snippets/shader-graph-blocks/specular-aa-screen-space-variance.md)] [!include[](snippets/shader-graph-blocks/specular-aa-threshold.md)] [!include[](snippets/shader-graph-blocks/specular-occlusion.md)] [!include[](snippets/shader-graph-blocks/subsurface-mask.md)] [!include[](snippets/shader-graph-blocks/iris-plane-offset.md)] [!include[](snippets/shader-graph-blocks/iris-radius.md)] [!include[](snippets/shader-graph-blocks/iris-caustic-intensity-multiplier.md)] [!include[](snippets/shader-graph-blocks/iris-caustic-blend.md)]
    Property Description Setting Dependency Default Value

    Graph Settings

    Surface Options

    [!include[](snippets/shader-properties/surface-options/eye-material-type.md)] [!include[](snippets/shader-properties/surface-options/recursive-rendering.md)] [!include[](snippets/shader-properties/surface-options/surface-type.md)] [!include[](snippets/shader-properties/surface-options/rendering-pass.md)] [!include[](snippets/shader-properties/surface-options/blending-mode.md)] [!include[](snippets/shader-properties/surface-options/receive-fog.md)] [!include[](snippets/shader-properties/surface-options/depth-test.md)] [!include[](snippets/shader-properties/surface-options/depth-write.md)] [!include[](snippets/shader-properties/surface-options/cull-mode.md)] [!include[](snippets/shader-properties/surface-options/sorting-priority.md)] [!include[](snippets/shader-properties/surface-options/back-then-front-rendering.md)] [!include[](snippets/shader-properties/surface-options/transparent-depth-prepass.md)] [!include[](snippets/shader-properties/surface-options/transparent-depth-postpass.md)] [!include[](snippets/shader-properties/surface-options/transparent-writes-motion-vectors.md)] [!include[](snippets/shader-properties/surface-options/preserve-specular-lighting.md)] [!include[](snippets/shader-properties/surface-options/alpha-clipping.md)] [!include[](snippets/shader-properties/surface-options/use-shadow-threshold.md)] [!include[](snippets/shader-properties/surface-options/alpha-to-mask.md)] [!include[](snippets/shader-properties/surface-options/exclude-from-taau.md)] [!include[](snippets/shader-properties/surface-options/double-sided-mode.md)] [!include[](snippets/shader-properties/surface-options/fragment-normal-space.md)] [!include[](snippets/shader-properties/surface-options/receive-decals.md)] [!include[](snippets/shader-properties/surface-options/receive-ssr.md)] [!include[](snippets/shader-properties/surface-options/receive-ssr-transparent.md)] [!include[](snippets/shader-properties/surface-options/geometric-specular-aa.md)] [!include[](snippets/shader-properties/surface-options/ss-depth-offset.md)] [!include[](snippets/shader-properties/surface-options/conservative-depth-offset.md)] [!include[](snippets/shader-properties/surface-options/velocity.md)] [!include[](snippets/shader-properties/surface-options/tessellation.md)] [!include[](snippets/shader-properties/surface-options/subsurface-scattering.md)] [!include[](snippets/shader-properties/surface-options/iris-normal.md)]
    Property Description

    Advanced Options

    [!include[](snippets/shader-properties/advanced-options/specular-occlusion-mode.md)] [!include[](snippets/shader-properties/advanced-options/override-baked-gi.md)] [!include[](snippets/shader-properties/advanced-options/support-lod-crossfade.md)] [!include[](snippets/shader-properties/advanced-options/add-precomputed-velocity.md)]
    Property Description

    Other top level settings

    [!include[](snippets/shader-properties/support-vfx-graph.md)] [!include[](snippets/shader-properties/support-high-quality-line-rendering.md)]
    Property Description
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)