Contents

SKEffectNode

A node that renders its children into a separate buffer, optionally applying an effect, before drawing the final result.

Declaration

class SKEffectNode

Mentioned in

Overview

An SKEffectNode object renders its children into a buffer and optionally applies a Core Image filter to this rendered output. Because effect nodes conform to SKWarpable, you can also use them to apply distortions to nodes that don’t implement the protocol, such as shape and video nodes. Use effect nodes to incorporate sophisticated special effects into a scene or to cache the contents of a static subtree for faster rendering performance.

Each time a new frame is rendered using the effect node, the effect node follows these steps:

  1. It draws its children into a private framebuffer.

  2. It applies a Core Image effect to the private framebuffer. This stage is optional; see the filter and shouldEnableEffects properties.

  3. It blends the contents of its private framebuffer into its parent’s framebuffer, using one of the standard sprite blend modes.

  4. It discards its private framebuffer. This step is optional; see the shouldRasterize property.

Topics

Applying Core Image Filters with an Effect Node

Warping Nodes with an Effect Node

Applying a Shader with an Effect Node

Flattening an Effect Node’s Child Tree for Performance Improvement

Configuring Alpha Blending

See Also

Nodes that Modify Drawing