1. Home
  2. Docs
  3. PopcornFX v2.7
  4. Concepts
  5. Samplers
  6. Texture sampler

Texture sampler

The texture sampler allows you to sample a 2D texture (luminance or RGBA), it is useful to encode particle properties (for example, for particles spawned on a mesh shape):

Image sampler

The texture sampler is stable and consistent: if you author a texture with some channels at full intensity or at full zero, you’ll get exactly 1.0 or 0.0 when sampling them back, even if the texture is in a compressed format. You will not get unprecise values such as 1.0001, or 0.9999, or 0.0001.


Texture samplers are used to extract color information at a specified UV (random, extracted from a mesh shape sampler, …) but also to generate UVs from the texture density distribution.

Texture samplers are most commonly used with the following templates:

  • TextureSample
  • TextureProperties
  • TextureSampleDensity
  • TextureRemapDensity
Was this article helpful to you? Yes No

How can we help?