RefractionMaterial
Refraction material
Refraction material utilizes ray tracing approach to implement refractions of light inside a mesh volume. It is used for rendering of gems, diamons or glass. Several parameters fine-tune ray tracing mechanics and optimize for quality-performance trade offs. Environment texture is used as a sperical source of light refracting inside the mesh, one can use dynamic texture to reflect surrounding objects of the scene.
Extends
Section titled “Extends”ShaderMaterial
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RefractionMaterial(
envMap
,color
,opacity
,bounces
,ior
,fresnel
,aberrationStrength
,fastChroma
):RefractionMaterial
Constructor
Parameters
Section titled “Parameters”envMap
Section titled “envMap”Environment map
Texture
| CubeTexture
Color
= ...
Color of the material
opacity
Section titled “opacity”number
= 1.0
Opacity of the material
bounces
Section titled “bounces”number
= 4
Number of ray-cast bounces
number
= 2.4
Refraction index
fresnel
Section titled “fresnel”number
= 0
Fresnel, strip light
aberrationStrength
Section titled “aberrationStrength”number
= 0.2
RGB shift intensity
fastChroma
Section titled “fastChroma”boolean
= true
Use fewer ray casts for the RGB shift
Returns
Section titled “Returns”RefractionMaterial
Overrides
Section titled “Overrides”ShaderMaterial.constructor