docs.unity3d.com
    Show / Hide Table of Contents

    Surfgrad From Texture

    Samples a Texture 2D and returns a Surface Gradient. This accepts a tangent space normal or height texture as input. Dropdowns provide options for how to interpret and process the texture.

    Screenshot

    Ports

    Name Direction Type Binding Description
    Texture Input Texture 2D None Texture 2D to sample
    Sampler Input Sampler State Default sampler state Sampler for the texture
    UV Input Vector 2 UV UV coordinates
    Base Normal Input Vector 3 None Base normal
    Base Position Input Vector 3 None Base position (predisplacement)
    Scale Dependent Input Boolean None Adjust the surfgrad intensity based on scale
    Surfgrad Output Vector 3 None Output surface gradient

    Controls

    Name Type Options Description
    Type Dropdown Normal, Height Selects the texture type
    Height Quality Dropdown High, Medium, Low Selects the technique used to interpret height textures
    Tangents Dropdown Calculate, Mesh UV0 Selects between calculating tangents for any UV set or using existing tangents for UV0
    Space Dropdown World, Object Selects the coordinate space to use for Scale Dependent if enabled
    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