Skip to content

TileModifier

TileModifier is a coordinate modifier that tiles one or more axes of the layer buffer across the full physical region, dividing the buffer size by the repeat count on each active axis.

Purpose

Without a modifier the EffectsLayer buffer covers the full physical region. With repeatsX = 2 the buffer is half as wide: the effect fills a smaller tile, and that tile is repeated across the region by index wrapping. This reduces memory and effect CPU cost while filling the full physical region with a repeating pattern.

TileModifier is the complement of MirrorModifier: Mirror reflects (folds) the region; Tile repeats (wraps) it without mirroring.

Controls

Key UI type Min Max Default Description
repeatsX range 1 8 1 Number of horizontal tiles
repeatsY range 1 8 1 Number of vertical tiles
repeatsZ range 1 8 1 Number of depth tiles
enabled toggle true When false the modifier is bypassed

A repeat count of 1 leaves the axis unchanged. Ceiling division is used so odd region sizes do not lose a pixel.

Wiring

Add as a child of an EffectsLayer:

{ "type": "TileModifier", "id": "tile1", "parent_id": "effects1" }

Behaviour

  • Static (isStatic() == true): the transform is a pure index remapping with no per-frame state. DriverLayer bakes the full physical-to-layer index table at setup. No per-frame CPU cost beyond the bake.
  • Expand case: buffer shrinks, physical region stays the same. Multiple physical pixels map to the same layer pixel (1:N mapping, same as MirrorModifier).
  • Combining TileModifier and MirrorModifier on the same layer applies both transforms in child order.

Example: 2x2 tiling on a 10x8 grid

  • Region: 10 wide x 8 high
  • Buffer after repeatsX=2, repeatsY=2: 5 wide x 4 high
  • Physical pixel at (7, 5) maps to layer pixel at (7%5, 5%4) = (2, 1)

JSON schema

{
  "type": "TileModifier",
  "id": "tile1",
  "parent_id": "effects1",
  "props": {
    "repeatsX": 2,
    "repeatsY": 2,
    "repeatsZ": 1
  }
}