Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PMREMGenerator

This class generates a Prefiltered, Mipmapped Radiance Environment Map (PMREM) from a cubeMap environment texture. This allows different levels of blur to be quickly accessed based on material roughness. It is packed into a special CubeUV format that allows us to perform custom interpolation so that we can support nonlinear formats such as RGBE.l Unlike a traditional mipmap chain, it only goes down to the LOD_MIN level (above), and then creates extra even e filtered 'mips' at the same LOD_MIN resolution, associated with higher roughness levels. In this way we maintain resolution to smoothly interpolate diffuse lighting while limiting sampling computation.

Hierarchy

  • PMREMGenerator

Index

Constructors

constructor

Methods

compileCubemapShader

  • compileCubemapShader(): void

compileEquirectangularShader

  • compileEquirectangularShader(): void
  • Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency.

    Returns void

dispose

  • dispose(): void
  • Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, so you should not need more than one PMREMGenerator object. If you do, calling dispose() on one of them will cause any others to also become unusable.

    Returns void

fromCubemap

fromEquirectangular

fromScene

  • Generates a PMREM from a supplied Scene, which can be faster than using an image if networking bandwidth is low. Optional near and far planes ensure the scene is rendered in its entirety (the cubeCamera is placed at the origin).

    Parameters

    • scene: I3JS.Scene

      The given scene.

    • Optional sigma: number
    • Optional near: number

      The near plane value. Default is 0.1.

    • Optional far: number

      The far plane value. Default is 100.

    Returns I3JS.WebGLRenderTarget

Generated using TypeDoc