Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SubSurfaceConfiguration

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

Hierarchy

  • SubSurfaceConfiguration

Implements

Index

Constructors

constructor

  • Builds a subsurface configuration object

    Parameters

    Returns SubSurfaceConfiguration

Properties

enabledSearch playground for enabled

enabled: boolean

Is subsurface enabled

metersPerUnitSearch playground for metersPerUnit

metersPerUnit: number

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

nameSearch playground for name

name: string

Name of the configuration

needsImageProcessingSearch playground for needsImageProcessing

needsImageProcessing: boolean

Does the output of this prepass need to go through imageprocessing

postProcessSearch playground for postProcess

Post process to attach for screen space subsurface scattering

ssDiffusionProfileColorsSearch playground for ssDiffusionProfileColors

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 texturesRequiredSearch playground for texturesRequired

texturesRequired: number[]

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

Accessors

ssDiffusionD

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

    Returns number[]

ssDiffusionS

  • get ssDiffusionS(): number[]
  • Diffusion profile color for subsurface scattering

    Returns number[]

ssFilterRadii

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

    Returns number[]

Methods

addDiffusionProfileSearch playground for addDiffusionProfile

  • 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

clearAllDiffusionProfilesSearch playground for clearAllDiffusionProfiles

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

    Returns void

createPostProcessSearch playground for createPostProcess

disposeSearch playground for dispose

  • dispose(): void
  • Disposes this object

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method