Skip to main content

Effect

An custom shader that is run on the GPU.

Local Only: this Item can only be added to the local scene using the OBR.scene.local API.

Experimental: this Item is currently experimental and the API is likely to change.

Extends Item

TYPE
object
NAMETYPEDESCRIPTION
type"EFFECT"The type of item
widthnumberThe width of effect when set to "STANDALONE"
heightnumberThe height of effect when set to "STANDALONE"
effectType"STANDALONE" | "ATTACHMENT" | "VIEWPORT"The type of effect. See here for more
skslstringThe shader code to use in the Skia shading language. See here for more
uniformsUniformThe current uniforms to pass into the effect. See here for more
blendModeBlendModeThe blend mode to use for the effect

Type Definitions

Uniform

TYPE
object

Properties

NAMETYPEDESCRIPTION
namestringThe name of the uniform. This must match the name in the shader
valuenumber | Vector2 | Vector3 | MatrixThe value of the uniform. This must match the type in the shader

BlendMode

TYPEvalues
string"CLEAR" | "SRC" | "DST" | "SRC_OVER" | "DST_OVER" | "SRC_IN" | "DST_IN" | "SRC_OUT" | "DST_OUT" | "SRC_ATOP" | "DST_ATOP" | "XOR" | "PLUS" | "MODULATE" | "SCREEN" | "OVERLAY" | "DARKEN" | "LIGHTEN" | "COLOR_DODGE" | "COLOR_BURN" | "HARD_LIGHT" | "SOFT_LIGHT" | "DIFFERENCE" | "EXCLUSION" | "MULTIPLY" | "HUE" | "SATURATION" | "COLOR" | "LUMINOSITY"