Class SubSurfaceConfiguration
Hierarchy
- SubSurfaceConfiguration
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Builds a subsurface configuration object
Parameters
-
scene: Scene
The scene
Returns SubSurfaceConfiguration
-
Properties
enabledSearch playground for enabled
Is subsurface enabled
meters Per UnitSearch playground for metersPerUnit
Defines the ratio real world => scene units. Used for subsurface scattering
nameSearch playground for name
Name of the configuration
post ProcessSearch playground for postProcess
Post process to attach for screen space subsurface scattering
ss Diffusion Profile ColorsSearch playground for ssDiffusionProfileColors
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 textures RequiredSearch playground for texturesRequired
Textures that should be present in the MRT for this effect to work
Accessors
ss DiffusionD
-
Diffusion profile max color channel value for subsurface scattering
Returns number[]
ss DiffusionS
-
Diffusion profile color for subsurface scattering
Returns number[]
ss Filter Radii
-
Diffusion profile filter radius for subsurface scattering
Returns number[]
Methods
add Diffusion ProfileSearch playground for addDiffusionProfile
-
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
-
clear All Diffusion ProfilesSearch playground for clearAllDiffusionProfiles
-
Deletes all diffusion profiles. Note that in order to render subsurface scattering, you should have at least 1 diffusion profile.
Returns void
create Post ProcessSearch playground for createPostProcess
-
Creates the sss post process
Returns SubSurfaceScatteringPostProcess
The created post process
disposeSearch playground for dispose
-
Disposes this object
Returns void
Contains all parameters needed for the prepass to perform screen space subsurface scattering