PopcornFX v2.12

Generic selectors
Exact matches only
Search in title
Search in content
  1. Home
  2. Docs
  3. PopcornFX v2.12
  4. Node Reference
  5. Builtin nodes
  6. Samplers
  7. Image



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).
The sampler is stable/consistent, meaning that if you author a texture with some channels at full intensity or at full zero, even if the texture is in a compressed format, you’ll get exactly 1.0 or 0.0 when sampling them back, and not unprecise values like 1.0001, or 0.0001.

TextureResourceStringPath of the texture to be used, relative to the root of the project.
AtlasSourceenumSpecifies where the sampler fetches the atlas/sub-UV data

  • Procedural: atlas is defined by an u*v tile count
  • External: sampler will load an external atlas definition file (.pkat)
AtlasSubdivuint2Number of sub-rectangles in the atlas, along each UV dimension.
AtlasDefinitionStringOptional path to a texture atlas file (see how to create atlas files), relative to the root of the project.
If a path is specified, will allow to sample sub-frames of the image independently, like in billboard renderers.
OutputTypeenumDetermines if the sampler will sample the texture as an rgba or grayscale texture.

  • float: will sample as grayscale, the sample script function will return a float
  • float4: will sample as RGBA, the sample script function will return a float4
SampleRawValuesboolIf enabled, tells the image sampler to not perform any runtime conversions and to sample the raw texel data from the source texture.
Enable this if you want minimal runtime memory and performance overhead when loading the effect.
If enabled, and OutputType is float, will map the ‘red’ channel of the texture.
SourceGammaenumGamma-space of the source texture.
Some texture formats explicitly encode the gamma-space, some others don’t.

  • Auto: tells the runtime to do its best and use the texture format specified in the texture, if any.
  • Linear
  • sRGB
OutputGammaenumGamma-space you want the sampled values to be in.
If you plan on assigning the texels to color values, and your lighting-pipeline is gamma-correct / in linear space, use Linear.
Otherwise, use sRGB to get the values in sRGB space.

  • Linear
  • sRGB
DensityPowerfloatDensities will be exponentiated with this value. It allows to quickly change the perceived “contrast” of the density map.
DensitySrcenumThe density map will be built from the selected channel.

  • Red
  • Green
  • Blue
  • Alpha
  • RGBA_Average
DensityRGBAWeightsfloat4if DensitySrc is set to RGBA_Average, these are the weights used for averaging.
They will be renormalized to 1 automatically.
Output pins
DatadataImageImage resource
+ all sampler properties


Was this article helpful to you? Yes No

How can we help?