Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LowResRenderPass

The LowResRenderPass renders the scene at a lower resolution into an internal WebGLRenderTarget, and then copies the result into the frame buffer. The size of the internal buffer is determined by the current frame buffer size multiplied by pixelRatio.

note

Since no anti-aliasing is applied during dynamic rendering, visual artifacts may be visible.

Hierarchy

  • Pass
    • LowResRenderPass

Implements

Index

Constructors

constructor

  • The constructor for LowResRenderPass. It builds an internal scene with a camera looking at a quad.

    Parameters

    • Optional lowResPixelRatio: undefined | number

      The pixelRatio determines the resolution of the internal WebGLRenderTarget. Values between 0.5 and window.devicePixelRatio can be tried to give good results. A value of undefined disables the low res render pass. The value should not be larger thanwindow.devicePixelRatio.

    Returns LowResRenderPass

Properties

enabled

enabled: boolean = false

Optional lowResPixelRatio

lowResPixelRatio: undefined | number

The pixelRatio determines the resolution of the internal WebGLRenderTarget. Values between 0.5 and window.devicePixelRatio can be tried to give good results. A value of undefined disables the low res render pass. The value should not be larger thanwindow.devicePixelRatio.

renderToScreen

renderToScreen: boolean = false

Accessors

pixelRatio

  • get pixelRatio(): number | undefined
  • set pixelRatio(ratio: number | undefined): void
  • If a value is specified, a low resolution render pass is used to render the scene into a low resolution render target, before it is copied to the screen.

    A value of undefined disables the low res render pass. The value should not be larger than window.devicePixelRatio.

    default

    undefined

    Returns number | undefined

  • If a value is specified, a low resolution render pass is used to render the scene into a low resolution render target, before it is copied to the screen.

    A value of undefined disables the low res render pass. The value should not be larger than window.devicePixelRatio.

    default

    undefined

    Parameters

    • ratio: number | undefined

    Returns void

Methods

dispose

  • dispose(): void

render

  • render(renderer: WebGLRenderer, scene: Scene, camera: PerspectiveCamera | OrthographicCamera, writeBuffer: WebGLRenderTarget | null, readBuffer: WebGLRenderTarget): void
  • The render function of LowResRenderPass. It renders the whole scene into an internal WebGLRenderTarget instance with a lower resolution, using the passed in WebGLRenderer. The low resolution image is then copied to the writeBuffer, which is undefined in case it is the screen.

    override

    Parameters

    • renderer: WebGLRenderer

      The ThreeJS WebGLRenderer instance to render the scene with.

    • scene: Scene

      The ThreeJS Scene instance to render the scene with.

    • camera: PerspectiveCamera | OrthographicCamera

      The ThreeJS Camera instance to render the scene with.

    • writeBuffer: WebGLRenderTarget | null

      A ThreeJS WebGLRenderTarget instance to render the scene to.

    • readBuffer: WebGLRenderTarget

      A ThreeJS WebGLRenderTarget instance to render the scene.

    Returns void

setSize

  • setSize(width: number, height: number): void

Generated using TypeDoc