GPU Particles

self:set_visibility_aabb

Client

Sets the box outside of which particles are culled

Syntax

local status = self:set_visibility_aabb(
    position,
    size
)

Raise the box when particles travel far from the emitter.

  • Particles outside the box are not drawn, which makes fast or long-lived particles pop out of view.

Parameters

TypeNameDescription
vector3positionCorner of the box as {x, y, z}
vector3sizeSize of the box as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Give the culling box more room
local entity = particle.gpu.create()

entity:set_visibility_aabb({-15, -15, -15}, {30, 30, 30})

On this page