Contents

init(_:)

Creates an object from a custom material’s specular property.

Declaration

init(_ value: CustomMaterial.Specular)

Parameters

  • value:

    The custom material’s specular property.

Discussion

RealityKit automatically draws specular highlights for physically based materials using the values of various properties, primarily roughness and metallic. Specular highlights are bright spots of reflected light that appear on shiny objects.

[Image]

While many real-world objects can be accurately and realistically simulated with just the core PBR properties, you can create additional realistic effects by augmenting the specular highlights.

This initializer creates a PhysicallyBasedMaterial.Specular object from the specular property of a CustomMaterial.

See Also

Creating a specular object