Grid

Overview

image
The grid sampler represents a low-level memory "array" that can be read or written to by particles.
Grids come in 1D, 2D, 3D, or 4D layouts.
When exposed as attribute-samplers in the effect, and used in a GPU-sim layer, 2D grids can be bound as render-textures inside engine materials & shaders, if the engine supports it.
It can be used either through the grid sampler script functions, or using the template core-library nodes, such as grid.read.

Property

Type

Description

Order

enum

Dimensionality of the grid

  • 1D: Grid is a simple linear array, cells are indexed using an int 'x' index

  • 2D: Grid is a 2D array, like a texture, cells are indexed using an int2 'xy' index

  • 3D: Grid is a 3D array, like a volume texture or a vector-field, cells are indexed using an int3 'xyz' index

  • 4D: Grid is a 4D array, cells are indexed using an int4 'xyzw' index

Dimension

int
int2
int3
int4

Number of cells in the grid along each axis, actual type depends on the value of the Type property

Type

enum

Type of the data stored inside the grid

  • float

  • float2

  • float3

  • float4

  • int

  • int2

  • int3

  • int4

Output pins

DataEventStream

dataEventStream

The event stream data

+ all sampler properties