AtomicFunctionNode

Last modified: Mar 5, 2026

AtomicFunctionNode represents any function that can operate on atomic variable types within a shader. In an atomic function, any modification to an atomic variable will occur as an indivisible step with a defined order relative to other modifications. Accordingly, even if multiple atomic functions are modifying an atomic variable at once atomic operations will not interfere with each other.

This node can only be used with a WebGPU backend.

Constructor

new AtomicFunctionNode(method, pointerNode, valueNode)
ParameterTypeDefault Value
methodstring
pointerNodeNode
valueNodeNode

Constructs a new atomic function node.

AccessorType

Properties

PropertyTypeDefault Value
methodstring
pointerNodeNode
valueNodeNode
MethodType

Extends

Node

atomicFunc

TSL function for appending an atomic function call into the programmatic flow of a compute shader.

ParameterTypeDefault Value
methodstring
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicLoad

Loads the value stored in the atomic variable.

ParameterTypeDefault Value
pointerNodeNode

Returns

AtomicFunctionNode

atomicStore

Stores a value in the atomic variable.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicAdd

Increments the value stored in the atomic variable.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicSub

Decrements the value stored in the atomic variable.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicMax

Stores in an atomic variable the maximum between its current value and a parameter.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicMin

Stores in an atomic variable the minimum between its current value and a parameter.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicAnd

Stores in an atomic variable the bitwise AND of its value with a parameter.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicOr

Stores in an atomic variable the bitwise OR of its value with a parameter.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode

atomicXor

Stores in an atomic variable the bitwise XOR of its value with a parameter.

ParameterTypeDefault Value
pointerNodeNode
valueNodeNode

Returns

AtomicFunctionNode