cullModeOverride
TypeScriptget cullModeOverride(): (MaterialParameterTypes_FaceCulling) | nullSwift declarationvar cullModeOverride: SpotLightComponent.Shadow.ShadowMapCullMode? { get set }The light's culling mode for shadow map rendering.
struct · iOS 13.0+ · SDK 27.1
struct ShadowA spotlight component that adds shadows to entities that it illuminates.
get cullModeOverride(): (MaterialParameterTypes_FaceCulling) | nullSwift declarationvar cullModeOverride: SpotLightComponent.Shadow.ShadowMapCullMode? { get set }The light's culling mode for shadow map rendering.
set cullModeOverride(value: (MaterialParameterTypes_FaceCulling) | null)Swift declarationvar cullModeOverride: SpotLightComponent.Shadow.ShadowMapCullMode? { get set }The light's culling mode for shadow map rendering.
get zFar(): SpotLightComponent_Shadow_ShadowClippingPlaneSwift declarationvar zFar: SpotLightComponent.Shadow.ShadowClippingPlane { get set }The orthogonal plane of the shadow frustum that's furthest from the spotlight. The `zFar` is the maximum distance between the light and a visible surface for casting shadows. The spotlight applies the value from ``SpotLightComponent/attenuationRadius``, when you set this property to ``ShadowClippingPlane/automatic``, which is its default value. Setting this value to ``ShadowClippingPlane/fixed(_:)`` is equivalent to assigning it to `min(zFar, attenuationRadius)`.
set zFar(value: SpotLightComponent_Shadow_ShadowClippingPlane)Swift declarationvar zFar: SpotLightComponent.Shadow.ShadowClippingPlane { get set }The orthogonal plane of the shadow frustum that's furthest from the spotlight. The `zFar` is the maximum distance between the light and a visible surface for casting shadows. The spotlight applies the value from ``SpotLightComponent/attenuationRadius``, when you set this property to ``ShadowClippingPlane/automatic``, which is its default value. Setting this value to ``ShadowClippingPlane/fixed(_:)`` is equivalent to assigning it to `min(zFar, attenuationRadius)`.
get zNear(): SpotLightComponent_Shadow_ShadowClippingPlaneSwift declarationvar zNear: SpotLightComponent.Shadow.ShadowClippingPlane { get set }The near-plane of a shadow frustum. The `zNear` is the minimum distance between the light and a visible surface for casting shadows. The default value for `zNear` is ``ShadowClippingPlane/automatic``.
set zNear(value: SpotLightComponent_Shadow_ShadowClippingPlane)Swift declarationvar zNear: SpotLightComponent.Shadow.ShadowClippingPlane { get set }The near-plane of a shadow frustum. The `zNear` is the minimum distance between the light and a visible surface for casting shadows. The default value for `zNear` is ``ShadowClippingPlane/automatic``.
get layers(): (RenderLayer_Set) | nullSwift declarationvar layers: RenderLayer.Set? { get set }The layers of entities that cast shadows from this light. An entity casts a shadow into this light's shadow map when the layers of its ``RenderLayerComponent`` intersect with this set. Set this property to: - `nil` (the default) to inherit ``SpotLightComponent/layers``, so any entity the light illuminates can also cast a shadow from it. - An empty set to disable shadow casting from this light entirely. Shadow casting can be restricted by layer on devices with Apple6 GPU family feature support.
set layers(value: (RenderLayer_Set) | null)Swift declarationvar layers: RenderLayer.Set? { get set }The layers of entities that cast shadows from this light. An entity casts a shadow into this light's shadow map when the layers of its ``RenderLayerComponent`` intersect with this set. Set this property to: - `nil` (the default) to inherit ``SpotLightComponent/layers``, so any entity the light illuminates can also cast a shadow from it. - An empty set to disable shadow casting from this light entirely. Shadow casting can be restricted by layer on devices with Apple6 GPU family feature support.
static initLayers(layers?: (RenderLayer_Set) | null): SpotLightComponent_ShadowSwift declarationinit(layers: RenderLayer.Set? = nil)Creates a spot light shadow that accepts shadow casters from the specified layers. - Parameter layers: The layers of entities that cast shadows from this light. Pass `nil` (the default) to inherit ``SpotLightComponent/layers``, or an empty set to disable shadow casting entirely.
get quality(): SpotLightComponent_Shadow_QualityModeSwift declarationvar quality: SpotLightComponent.Shadow.QualityMode { get set }The shadow-filtering algorithm this light uses. Set to ``QualityMode/medium`` or ``QualityMode/high`` to opt the light into soft shadows, whose penumbra widens with ``lightSize`` and with the distance between the caster and the receiving surface. The default value is ``QualityMode/low``, which produces a hard-edged shadow whose appearance is independent of ``lightSize``. Higher quality modes use more samples per shadow, which increases GPU work. Excessive use of higher shadow quality lights may contribute to user-noticeable frame drops and can cause the device to heat up in graphically demanding scenes. Monitor the thermal state to lower quality as a mitigation, if necessary. Apps can monitor thermal state changes by subscribing to the [thermalStateDidChange](https://developer.apple.com/documentation/foundation/notificationcenter/messageidentifier/thermalstatedidchange) notification. To stay responsive to the device's available thermal headroom, read `ProcessInfo.processInfo.thermalState` and observe `ProcessInfo.thermalStateDidChangeNotification` to react when it changes. As the reported state moves from `.fair` toward `.serious` and `.critical` switch the light to a lower quality.
set quality(value: SpotLightComponent_Shadow_QualityMode)Swift declarationvar quality: SpotLightComponent.Shadow.QualityMode { get set }The shadow-filtering algorithm this light uses. Set to ``QualityMode/medium`` or ``QualityMode/high`` to opt the light into soft shadows, whose penumbra widens with ``lightSize`` and with the distance between the caster and the receiving surface. The default value is ``QualityMode/low``, which produces a hard-edged shadow whose appearance is independent of ``lightSize``. Higher quality modes use more samples per shadow, which increases GPU work. Excessive use of higher shadow quality lights may contribute to user-noticeable frame drops and can cause the device to heat up in graphically demanding scenes. Monitor the thermal state to lower quality as a mitigation, if necessary. Apps can monitor thermal state changes by subscribing to the [thermalStateDidChange](https://developer.apple.com/documentation/foundation/notificationcenter/messageidentifier/thermalstatedidchange) notification. To stay responsive to the device's available thermal headroom, read `ProcessInfo.processInfo.thermalState` and observe `ProcessInfo.thermalStateDidChangeNotification` to react when it changes. As the reported state moves from `.fair` toward `.serious` and `.critical` switch the light to a lower quality.
get depthBias(): numberSwift declarationvar depthBias: Float { get set }A constant value that RealityKit applies as a bias to its shadow calculations. Reduce visual effects such as _shadow acne_, by adjusting this property. The default value is `1.0`.
set depthBias(value: number)Swift declarationvar depthBias: Float { get set }A constant value that RealityKit applies as a bias to its shadow calculations. Reduce visual effects such as _shadow acne_, by adjusting this property. The default value is `1.0`.
get lightSize(): numberSwift declarationvar lightSize: Float { get set }The radius of the spotlight's emitting surface, in meters. Larger values widen the penumbra and lengthen the transition between fully-shadowed and fully-lit regions, approximating the way an area light of that radius would shade a scene. The default value is `0.1`. This property has no effect when ``quality`` is ``QualityMode/low``, which always produces a hard-edged shadow.
set lightSize(value: number)Swift declarationvar lightSize: Float { get set }The radius of the spotlight's emitting surface, in meters. Larger values widen the penumbra and lengthen the transition between fully-shadowed and fully-lit regions, approximating the way an area light of that radius would shade a scene. The default value is `0.1`. This property has no effect when ``quality`` is ``QualityMode/low``, which always produces a hard-edged shadow.
static init(): SpotLightComponent_ShadowSwift declarationinit()Creates a new spot light shadow object.
No declarations were skipped in this snapshot.