SubSurfaceMaterial
Sub surface scattering based on this method.
This material is an implementation of the shader material using the shader in three/examples/jsm/shaders/SubsurfaceScatteringShader.js
.
<Box>
<SubSurfaceMaterial />
</Box>
Source : https://github.com/troisjs/trois/blob/master/src/materials/SubSurfaceMaterial.ts
uniform
Prop
You can use the uniform
prop to customize this material, e.g. :
<Box>
<SubSurfaceMaterial :uniform="{ thicknessColor: '#ffffff' }" />
</Box>
Name | Description | Type | Default |
---|---|---|---|
diffuse | Material color. | String | #ffffff |
thicknessColor | Thickness color. | String | #ffffff |
thicknessDistortion | Thickness distortion. | Number | 0.4 |
thicknessAmbient | Ambient thickness. | Number | 0.01 |
thicknessAttenuation | Thickness attenuation. | Number | 0.7 |
thicknessPower | Thickness power. | Number | 2 |
thicknessScale | Thickness scale | Number | 4 |
transparent | Whether or not the material is transparent. | Boolean | false |
opacity | Material opacity. | Number | 1 |
vertexColors | Use vertex colors on material. | Boolean | false |