Unity Products:Amplify Shader Editor/Sampler State
Sampler State Node
The Sampler State node enables the user to create and use sampling states separately from texture samplers. This is of great importance since graphic APIs only allow 16 different samplers on a shader but up to 128 textures.
When using textures and sampling states coupled together, the user is inherently is setting a max texture count of 16.
Sampler states can be created inline over the shader by specifying a Wrap and Filter modes or can be retrieved from a Texture Object or Texture Sampler placed over the canvas either via the Reference dropdown or the Tex Input port.
NOTE: This feature is only available on Unity 2018.1 or higher and the Use Sampling Macros flag must be turned on over the Master Node properties.
More info can be found over Unity's official documentation page
Nodes used:
Sampler State,
Texture Sample
Node Parameter | Description | Default Value |
---|---|---|
Reference | Specify if to create an inline sampler state or use an existing one
|
None |
Wrap Mode | Selects a wrap mode to be used on an inline sampler state.
|
Repeat |
U Axis | Selects a wrap mode specific for the U Axis. Only visible when Per Axis option is set over Wrap Mode
|
Repeat |
V Axis | Selects a wrap mode specific for the V Axis. Only visible when Per Axis option is set over Wrap Mode
|
Repeat |
Filter Mode | Select a filter mode to be used on an inline sampler state
|
Bilinear |
Aniso. Filtering | Select an anisotropic filtering mode to be used on an inline sampler state. Only available on Unity 2021.2 and above.
|
None |
NOTE: Mirror Once texture wrapping mode is not supported on most mobile GPUs/APIs, and will fallback to Mirror mode when support is not present.