Lighting

public struct Lighting : Encodable

Undocumented

  • Ambient light increases overall color visibility but can wash out the image.

    Declaration

    Swift

    public var ambient: Double?
  • Represents the extent that incident rays are reflected in a range of angles.

    Declaration

    Swift

    public var diffuse: Double?
  • Represents the level that incident rays are reflected in a single direction, causing shine.

    Declaration

    Swift

    public var specular: Double?
  • Alters specular reflection; the rougher the surface, the wider and less contrasty the shine.

    Declaration

    Swift

    public var roughness: Double?
  • Represents the reflectance as a dependency of the viewing angle; e.g.

    paper is reflective when viewing it from the edge of the paper (almost 90 degrees), causing shine.

    Declaration

    Swift

    public var fresnel: Double?
  • Creates Lighting object with specified properties.

    Declaration

    Swift

    public init(ambient: Double? = nil, diffuse: Double? = nil, specular: Double? = nil, roughness:
            Double? = nil, fresnel: Double? = nil)

    Parameters

    ambient

    Ambient light increases overall color visibility but can wash out the image.

    diffuse

    Represents the extent that incident rays are reflected in a range of angles.

    specular

    Represents the level that incident rays are reflected in a single direction, causing shine.

    roughness

    Alters specular reflection; the rougher the surface, the wider and less contrasty the shine.

    fresnel

    Represents the reflectance as a dependency of the viewing angle; e.g.