Taos API Reference
    Preparing search index...

    Class PointSpotLightPass

    Deferred point + spot lighting (render-graph version). Reads the GBuffer + VSM/projection textures and additively blends point/spot light contribution into the existing HDR target.

    Hierarchy (View Summary)

    • Pass<PointSpotLightDeps, PointSpotLightOutputs>
      • PointSpotLightPass
    Index

    Properties

    name: "PointSpotLightPass" = 'PointSpotLightPass'

    Human-readable identifier used in graph node labels and error messages.

    mode: PointSpotCullMode = 'none'

    Light-culling strategy. 'none' (default) brute-forces every light per pixel — cheap for a handful of lights. 'tiled' runs a compute pre-pass that bins lights into 16×16 screen tiles (reading the existing G-buffer depth, no depth pre-pass) so each pixel only shades the lights in its tile. 'clustered' bins into a 3D froxel grid (screen cells × exponential depth slices) so depth-discontinuity tiles don't over-keep lights; it needs no depth read at all. Both scale to the full MAX_POINT_LIGHTS/MAX_SPOT_LIGHTS cap. All pipelines are compiled up front so this can flip per-frame.

    areaLightsUseLtc: boolean = true

    Runtime toggle for the LTC rect path (only meaningful when the pass was created with useLtcAreaLights). Written into LightCounts.areaLightLtc each frame; when false, rects fall back to representative-point shading.

    Methods

    • Register the IES photometric profiles a point/spot light's iesProfileIndex can reference. Each profile is baked into one row of an r16float LUT (vertical angle 0..180° across the row, peak normalized to 1), sampled per-pixel in the lighting shader to reshape the light's falloff. Call once after parsing the .ies files (re-call to replace the set). Pass an empty array to clear them.

      Parameters

      Returns void

    • Insert the pass into graph for one frame. Implementations call graph.addPass(name, type, b => { ... }) exactly once and use the supplied PassBuilder to declare reads, writes, transient resources, and the execute callback.

      Parameters

      • graph: RenderGraph

        Graph being built this frame.

      • deps: PointSpotLightDeps

        Pass-specific dependency record (handles, scene data, etc.).

      Returns PointSpotLightOutputs

      Pass-specific output record (typically a set of handles downstream passes will consume).