ThreePipe
    Preparing search index...

    Function materialPreviewOptionsFromViewer

    • Returns the preview options that make a material preview look like the viewport of the viewer: the scene's environment map, its intensity and rotation, the tone mapping of the TonemapPlugin (when it is added and enabled) and the output colour space of the ScreenPass.

      With material, the tone mapping follows the material like in the viewport: it is null when the material opts out of tone mapping and the screen pass reads the GBuffer flags (see TonemapPlugin.isMaterialTonemapped). The output colour space is kept.

      The lights of the scene and screen pass effects other than tone mapping (vignette, film grain, chromatic aberration, bloom) are not in the previews.

      Parameters

      Returns Pick<
          MaterialPreviewOptions,
          | "environment"
          | "environmentIntensity"
          | "environmentRotation"
          | "toneMapping"
          | "outputColorSpace",
      >