ThreePipe
    Preparing search index...

    Class ViewerRenderManager

    Hierarchy (View Summary)

    Index
    _dirty: boolean = true
    autoBuildPipeline: boolean = true

    Set autoBuildPipeline = false to be able to set the pipeline manually.

    defaultRenderToScreen: boolean = true

    Default value for renderToScreen in render

    depthBuffer: boolean
    frameWaitTime: number = 0
    gbufferTarget: IRenderTarget | undefined

    Reference to the gbuffer target, if it exists. This can be set by plugins like DepthBufferPlugin, GBufferPlugin

    gbufferUnpackExtension: MaterialExtension | undefined

    The extension that can be used to upload and unpack the values in gbuffer target(s), if it exists. This can be set by plugins like DepthBufferPlugin, GBufferPlugin Note: this should not be changed after set by some plugin.

    maxHDRIntensity: number
    maxTempPerKey: 5
    msaa: number | boolean
    renderPass: ExtendedRenderPass
    rgbm: boolean
    screenPass: ScreenPass
    shadowMap: WebGLShadowMap
    shadowMapType: ShadowMapType
    stableNoise: boolean = false

    Use total frame count, if this is set to true, then frameCount won't be reset when the viewer is set to dirty. Which will generate different random numbers for each frame during postprocessing steps. With TAA set properly, this will give a smoother result.

    uiConfig: UiObjectConfig
    zPrepass: boolean
    DEFAULT_MSAA_SAMPLES: number = 4
    POWER_PREFERENCE: WebGLPowerPreference = 'high-performance'
    ShaderChunk: {} = ShaderChunk
    ShaderLib: { [name: string]: ShaderLibShader } = ShaderLib
    SHADOW_TEXTURE_RESERVE: number = 10

    Textures per shader kept free for the maps of a material, the environment map and the pipeline's textures when maxShadowMaps is 'auto'.

    • get displayCanvasScaling(): number

      Returns number

      use renderScale instead

    • set displayCanvasScaling(value: number): void

      Parameters

      • value: number

      Returns void

      use renderScale instead

    • get maxShadowMaps(): number | "auto"

      How many shadow maps a lit material may sample. Every shadow-casting point, spot or directional light adds a shadow map to the shader of every lit material (a spot light with a map adds two), and a GPU allows only renderer.capabilities.maxTextures textures per shader: 16 on Apple GPUs, 32 on most others. Past that, no shader compiles and nothing is drawn (an imported Blender scene with 16 shadow-casting lights, for example).

      Only visible lights count. Lights over the budget don't cast shadows while rendering: directional lights first, then point and spot lights by intensity, keep their shadows. Their castShadow is left as it is in the scene, the UI and exports; it's only turned off during render. A warning names the lights that lose their shadows.

      Lights with the same shadowGroup object are one light drawn with several shadow maps (CascadedShadowsPlugin's cascades): they keep or lose their shadows together, and when they lose them only the first of the group is lit during the render, so the light still counts once.

      'auto' (default): maxTextures minus SHADOW_TEXTURE_RESERVE, which leaves room for the maps of a material and the textures of the pipeline. A number sets it; Infinity turns the budget off.

      Returns number | "auto"

    • set maxShadowMaps(value: number | "auto"): void

      Parameters

      • value: number | "auto"

      Returns void

    • Parameters

      • __namedParameters: {
            a?: number;
            b?: number;
            depth?: boolean;
            g?: number;
            r?: number;
            stencil?: boolean;
            target?: IRenderTarget;
            viewport?: Vector4;
        }

      Returns void

    • Keeps rendering while the page is hidden, where the browser stops requestAnimationFrame: a clock in a worker drives the frames at about 60 a second until the page is visible again. For a task that must not pause, like a recording; it uses the CPU and GPU in the background. Each key holds it until stopRenderingWhenHidden with that key. Not in WebXR, whose session drives its own frames. As of November 2026, works in Chromium browsers; Safari pauses a hidden tab anyway. See HiddenPageClock.

      Parameters

      • key: string

      Returns void

    • Rend pixels from a render target into a new Uint8Array|Uint16Array|Float32Array buffer

      Parameters

      • target: WebGLRenderTarget

        render target to read from

      • textureIndex: number = 0

        index of the texture to use in the render target (only in case of multiple render target)

      Returns
          | Uint8Array<ArrayBufferLike>
          | Uint16Array<ArrayBufferLike>
          | Float32Array<ArrayBufferLike>

    • Parameters

      • material: {
            defines: Record<string, string | number | undefined>;
            uniforms: { [name: string]: IUniform<any> };
        }

      Returns this