Contents

RenderLayer

A named identifier for a group of meshes and lights.

Declaration

struct RenderLayer

Overview

Use a RenderLayer to associate a light with the entities it should illuminate, or to mark which entities a light affects. Every entity belongs to defaultLayer unless its RenderLayerComponent specifies otherwise.

Define your own layers as static constants in an extension so they’re easy to reuse:

extension RenderLayer {
    static let hero = RenderLayer("com.myapp.hero")
    static let background = RenderLayer("com.myapp.background")
}

Topics

Accessing default layers

Grouping render layers

Initializers

See Also

Portals, clipping, and occlusion