Contents

init(from:geometryModifier:)

Creates a custom material from an existing material and a geometry modifier.

Declaration

init(from material: any Material, geometryModifier: CustomMaterial.GeometryModifier) throws

Parameters

  • material:

    The material on which to base the custom material.

  • geometryModifier:

    The geometry modifier shader function.

Discussion

Use this initializer to create a custom material with the same properties as another existing material, but with a geometry modifier.

See Also

Creating custom materials