screenedBloom

A tinted glow of the child's bright parts, screened over a color you have already graded: film halation, phosphor bloom.

screenedBloom(slots: {
    strength: PropRef
    radius: PropRef
    tint: [number, number, number]
    threshold: number
    output: string
    extractName: string
}): {
    compute: GpuComputeNode
    screen: (base: Expr, at: Expr, params: GpuFragmentParams) => Expr
}

Import effects from shaders/std and use effects.blurs.screenedBloom.

strength is a prop; at 0 the glow pass does not run, so give it recompile: crosses(0). radius is a prop for the glow's spread in pixels. tint is an rgb triple (0–1) and threshold (0–1) the brightness a pixel must pass to glow. output and extractName are names unique to your definition. Returns compute, to set as the definition's compute:, and screen(base, at, params), which screens the glow at coordinate at over base in the fragment. The glow reaches past the child's alpha.

Parameters

NameTypeNotes
slots`{
strength: PropRef
radius: PropRef
tint: [number, number, number]
threshold: number
output: string
extractName: string

}` | |

Example

const halation = screenedBloom({strength: p('halation'), radius: p('halationRadius'), tint: [1, 0.38, 0.16], threshold: 0.62, output: 'halationTexture', extractName: 'myHalationExtract'})

Tip. Build it once at module level so the compute: field and the fragment read the same part.

See also

  • bloom — A glow: the child's bright parts spread into a soft halo that adds back on top.
  • frameSway — A slight drifting shift and rotation of where the child is read from, like film in an unsteady projector gate.

Used by

FilmStock