@pixi/3d
    Preparing search index...

    Interface SsaoEffectOptions

    Constructor options for SsaoEffect

    const options: SsaoEffectOptions = { radius: 0.5, intensity: 1.2, resolution: 1 };
    view3d.passes = [new SsaoEffect(options)];
    interface SsaoEffectOptions {
        bias?: number;
        blurStep?: number;
        enabled?: boolean;
        fadeDistance?: [number, number] | null;
        intensity?: number;
        maxDistance?: number;
        power?: number;
        radius?: number;
        resolution?: number | "inherit";
        samples?: number;
        sceneNormals?: boolean;
        stage?: EffectStage;
    }

    Hierarchy (View Summary)

    Index
    bias?: number

    Depth offset in world units that stops a surface occluding itself

    Raise it if flat surfaces show speckled shading; lower it if contact shadows vanish.

    0.025
    
    new SsaoEffect({ bias: 0.05 });
    
    blurStep?: number

    Spacing between blur taps, in texels of the occlusion buffer

    1.5
    
    new SsaoEffect({ blurStep: 2 });
    
    enabled?: boolean

    Whether the pass starts enabled; see Pass3D#enabled

    true
    
    view.passes = [new MeshPass({ name: 'wireframe', enabled: false })];
    
    fadeDistance?: [number, number] | null

    Depths in front of the camera, [start, end] in world units, across which the occlusion fades out

    Past end the effect skips its samples, which saves their cost and removes the speckle and dark bands it gives distant surfaces. null keeps occlusion at every depth.

    null
    
    new SsaoEffect({ fadeDistance: [40, 80] });
    
    intensity?: number

    Strength of the darkening

    0.9
    
    new SsaoEffect({ intensity: 1.5 });
    
    maxDistance?: number

    Depth gap in world units at which an occluder stops counting

    An occluder counts less the further it is in depth from the shaded point, which keeps a near object from casting a dark halo on what's far behind it. Lower it if halos show.

    radius * 0.65
    
    new SsaoEffect({ radius: 1, maxDistance: 0.3 });
    
    power?: number

    Exponent on the occlusion term; higher values darken the occluded areas further

    1.5
    
    new SsaoEffect({ power: 2 });
    
    radius?: number

    How far around each point the effect looks for occluders, in world units

    0.35
    
    new SsaoEffect({ radius: 1 });
    
    resolution?: number | "inherit"

    Texels per logical pixel for the occlusion, like a pixi filter's resolution

    'inherit' matches the scene, at View3D#resolution. On a high-DPI screen 1 is the usual choice: a quarter of the work at a device pixel ratio of 2. Fixed at construction.

    'inherit'
    
    new SsaoEffect({ resolution: 1 });
    
    samples?: number

    Samples per pixel; the cost of the occlusion pass grows with it

    16
    
    new SsaoEffect({ samples: 8 });
    
    sceneNormals?: boolean

    Whether the effect makes the view write normalOutput, so it reads each surface's own normal instead of rebuilding a flat one from depth

    The scene's normal is smooth across curves and carries normal-map detail, but it costs every opaque and glass pixel one more 4-byte write, which on a phone can cost more than it saves, and on WebGL it turns the view's MSAA off; see normalOutput. When another pass already makes the view write the normals, the effect reads them whatever this says. Fixed at construction.

    false
    
    new SsaoEffect({ sceneNormals: true });
    
    stage?: EffectStage

    Whether the effect reads the scene as light, before the tone curve, or the picture as it will show, after it

    Each effect class picks the right one by default, so set it only to move one instance, such as a tint meant for the light rather than the picture. See PostEffect#stage.

    'beforeToneMapping', unless the effect's class says otherwise
    
    new TintEffect({ tint: 0xffaa66, stage: 'beforeToneMapping' });