A game about forced loneliness, made by TACStudios
1# Sampler State Node 2 3## Description 4 5Defines a **Sampler State** for sampling textures. It should be used in conjunction with sampling [Nodes](Node.md) such as the [Sample Texture 2D Node](Sample-Texture-2D-Node.md). You can set a filter mode with the dropdown parameter **Filter** and a wrap mode with the dropdown parameter **Wrap**. 6 7When using a separate **Sample State Node** you can sample a **Texture 2D** twice, with different sampler parameters, without defining the **Texture 2D** itself twice. 8 9Not all filtering, wrap, and Anisotropic filtering modes are available on all platforms. 10 11## Ports 12 13| Name | Direction | Type | Binding | Description | 14|:-----|:----------|:--------------|:--------|:-------------| 15| Out | Output | Sampler State | None | Output value | 16 17## Controls 18 19| Name | Type | Options | Description | 20|:-------|:---------|:----------------------------------|:------------| 21| Filter | Dropdown | Linear, Point, Trilinear | Specifies which filtering mode to use for sampling. | 22| Wrap | Dropdown | Repeat, Clamp, Mirror, MirrorOnce | Specifies which wrap mode to use for sampling. | 23 24## Node Settings Controls 25 26The following control appears on the Node Settings tab of the Graph Inspector when you select the Sampler State Node. 27 28| Name | Type | Options | Description | 29|:----------------------|:---------|:----------------------|:------------| 30| Anisotropic Filtering | Dropdown | None, x2, x4, x8, x16 | Specifies the level of Anisotropic filtering to use to sample textures. | 31 32## Generated Code Example 33 34The following example code represents one possible outcome of this node. 35 36``` 37SamplerState _SamplerState_Out = _SamplerState_Linear_Repeat_sampler; 38```