Firstborn/Library/PackageCache/com.unity.shadergraph@12.1.11/Documentation~/Sample-Texture-3D-Node.md
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

27 lines
1.1 KiB
Markdown

# 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.
If you experience texture sampling errors while using this node in a graph which includes Custom Function Nodes or Sub Graphs, you can resolve them by upgrading to version 10.3 or later.
NOTE: This [Node](Node.md) can only be used in the **Fragment** [Shader Stage](Shader-Stage.md).
## 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);
```