Uses the UV coordinates generated by the Imposter UV node to sample an specific imposter texture. This creates the illusion of a 3D object on a billboard object because the imposter texture's frame changes based on the camera direction and angle. If the imposter object has more than one texture to sample (e.g. color, normal, mask, occlusion, etc,), multiple Imposter Sample nodes can be used.
| Name | Direction | Type | Description |
|---|---|---|---|
| Texture | Input | Texture2D | The texture asset to sample |
| Sampler | Input | Sampler State | The texture sampler to use for sampling the texture |
| UV0 | Input | Vector2 | The virtual UV for the base frame |
| UV1 | Input | Vector2 | The virtual UV for the second frame |
| UV2 | Input | Vector2 | The virtual UV for the third frame |
| Grid | Input | Vector4 | The current UV grid, which is used to find the corresponding sample frames |
| Weights | Input | Float | The blending values in between the slected three frames |
| RGBA | Output | Vector4 | A vector4 from the sampled texture |
| RGB | Output | Vector3 | A vector3 from the sampled texture |
| R | Output | Float | The r channel of the sampled texture |
| G | Output | Float | The g channel of the sampled texture |
| B | Output | Float | The b channel of the sampled texture |
| A | Output | Float | The a channel of the sampled texture |
The Imposter Sample Node [!includenodes-controls]
| Name | Sample Type | Description | |
|---|---|---|---|
| Type | Dropdown | Select whether to sample three frames or one frame. | |
| Three Frames | Blends between three frames to get the smoothest result. | ||
| One Frame | Calculates only one frame for better performance. UV1, UV2 and Weights inputs won't be shown. | ||
[!includenodes-generated-code], based on the selected Mode on the Imposter Sample Node node:
ImposterSample( Texture.tex, TexelSize, Weights, Grid, UV0, UV1, UV2, Sampler.samplerstate, RGBA);
ImposterSample_oneFrame( Texture.tex, TexelSize, Weights, Grid, UV0, UV1, UV2, Sampler.samplerstate, RGBA);