Skip to content

Documentation / @sw-file-lib/three / createGlassMaterial

Function: createGlassMaterial() ​

ts
function createGlassMaterial(uniforms?: GlassUniformController, materialParameters?: ShaderMaterialParameters): ShaderMaterial;

Defined in: material/glass.ts:107

Create the default glass material used for materialIndex 1 groups.

If you want to use custom uniforms, you can create them using createGlassUniforms and pass them to this function.

You can override the material parameters by passing a THREE.ShaderMaterialParameters object as the second argument.

Parameters ​

ParameterType
uniforms?GlassUniformController
materialParameters?ShaderMaterialParameters

Returns ​

ShaderMaterial

A new THREE.ShaderMaterial with the specified uniforms, or a default one if not provided.