docs.unity3d.com
    Show / Hide Table of Contents

    Sample Texture 3D Node

    Description

    Samples a Texture 3D and returns a Vector 4 color value for use in the shader. You can override the UV coordinates using the UV input and define a custom Sampler State using the Sampler input.

    NOTE: This Node can only be used in the Fragment Shader Stage.

    Ports

    Name Direction Type Binding Description
    Texture Input Texture 3D None Texture 3D to sample
    UV Input Vector 3 None 3 dimnensional UV coordinates
    Sampler Input Sampler State Default sampler state Sampler for the texture
    RGBA Output Vector 4 None Output value as RGBA

    Generated Code Example

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

    float4 _SampleTexture3D_Out = SAMPLE_TEXTURE3D(Texture, Sampler, UV);
    
    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