SubSurfaceConfiguration

Contains all parameters needed for the prepass to perform screen space subsurface scattering

Hierarchy

  • SubSurfaceConfiguration

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

enabled

Find examples in Playground
enabled: boolean

Is subsurface enabled

metersPerUnit

Find examples in Playground
metersPerUnit: number

Defines the ratio real world => scene units. Used for subsurface scattering

name

Find examples in Playground
name: string

Name of the configuration

postProcess

Find examples in Playground

Post process to attach for screen space subsurface scattering

ssDiffusionProfileColors

Find examples in Playground
ssDiffusionProfileColors: Color3[]

Diffusion profile colors for subsurface scattering You can add one diffusion color using addDiffusionProfile on scene.prePassRenderer See ... Note that you can only store up to 5 of them

Readonly texturesRequired

Find examples in Playground
texturesRequired: number[]

Textures that should be present in the MRT for this effect to work

Accessors

ssDiffusionD

Find examples in Playground
  • get ssDiffusionD(): number[]
  • Diffusion profile max color channel value for subsurface scattering

    Returns number[]

ssDiffusionS

Find examples in Playground
  • get ssDiffusionS(): number[]
  • Diffusion profile color for subsurface scattering

    Returns number[]

ssFilterRadii

Find examples in Playground
  • get ssFilterRadii(): number[]
  • Diffusion profile filter radius for subsurface scattering

    Returns number[]

Methods

addDiffusionProfile

Find examples in Playground
  • addDiffusionProfile(color: Color3): number
  • Adds a new diffusion profile. Useful for more realistic subsurface scattering on diverse materials.

    Parameters

    • color: Color3

      The color of the diffusion profile. Should be the average color of the material.

    Returns number

    The index of the diffusion profile for the material subsurface configuration

clearAllDiffusionProfiles

Find examples in Playground
  • clearAllDiffusionProfiles(): void
  • Deletes all diffusion profiles. Note that in order to render subsurface scattering, you should have at least 1 diffusion profile.

    Returns void

createPostProcess

Find examples in Playground

dispose

Find examples in Playground
  • dispose(): void
  • Disposes this object

    Returns void

Generated using TypeDoc