API

Function setSprite2DShaderParams

  • Set the user fx.params vec4 fed to this layer's custom shader (createSprite2DCustomShader) each frame. No visual effect unless the layer was created with a customShader. Read in WGSL as fx.params. Mutates in place; the renderer re-uploads the small FX UBO next frame.

    Parameters

    • layer: Sprite2DLayer
    • params: readonly [number, number, number, number]

    Returns void