ShadowOptions

actual class ShadowOptions

Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.

expect class ShadowOptions

Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.

actual class ShadowOptions

Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.

actual class ShadowOptions

Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.

actual class ShadowOptions

Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.

Constructors

Link copied to clipboard
actual constructor()
expect constructor()
constructor()
actual constructor()
actual constructor()

Properties

Link copied to clipboard
actual var blurWidth: Float

For VSM shadow type: blur width (0 to disable). Max: 125. Default: 0.0 (disabled).

expect var blurWidth: Float

For VSM shadow type: blur width (0 to disable). Max: 125. Default: 0.0 (disabled).

actual var blurWidth: Float

For VSM shadow type: blur width (0 to disable). Max: 125. Default: 0.0 (disabled).

actual var blurWidth: Float

For VSM shadow type: blur width (0 to disable). Max: 125. Default: 0.0 (disabled).

actual var blurWidth: Float

For VSM shadow type: blur width (0 to disable). Max: 125. Default: 0.0 (disabled).

Link copied to clipboard

Split positions for shadow cascades along the camera's Z axis. Camera near plane = 0.0f, far plane = 1.0f. For N cascades, store N-1 split positions (e.g., for 4 cascades: 0.25f, 0.50f, 0.75f). Use ShadowCascades helper methods to compute. Default: 0.125f, 0.25f, 0.50f.

Split positions for shadow cascades along the camera's Z axis. Camera near plane = 0.0f, far plane = 1.0f. For N cascades, store N-1 split positions (e.g., for 4 cascades: 0.25f, 0.50f, 0.75f). Use ShadowCascades helper methods to compute. Default: 0.125f, 0.25f, 0.50f.

Split positions for shadow cascades along the camera's Z axis. Camera near plane = 0.0f, far plane = 1.0f. For N cascades, store N-1 split positions (e.g., for 4 cascades: 0.25f, 0.50f, 0.75f). Use ShadowCascades helper methods to compute. Default: 0.125f, 0.25f, 0.50f.

Split positions for shadow cascades along the camera's Z axis. Camera near plane = 0.0f, far plane = 1.0f. For N cascades, store N-1 split positions (e.g., for 4 cascades: 0.25f, 0.50f, 0.75f). Use ShadowCascades helper methods to compute. Default: 0.125f, 0.25f, 0.50f.

Split positions for shadow cascades along the camera's Z axis. Camera near plane = 0.0f, far plane = 1.0f. For N cascades, store N-1 split positions (e.g., for 4 cascades: 0.25f, 0.50f, 0.75f). Use ShadowCascades helper methods to compute. Default: 0.125f, 0.25f, 0.50f.

Link copied to clipboard
actual var constantBias: Float

Constant bias in world units (e.g., meters) to move shadows away from the light. Ignored for VSM shadow type. Default: 0.001 (1mm).

expect var constantBias: Float

Constant bias in world units (e.g., meters) to move shadows away from the light. Ignored for VSM shadow type. Default: 0.001 (1mm).

actual var constantBias: Float

Constant bias in world units (e.g., meters) to move shadows away from the light. Ignored for VSM shadow type. Default: 0.001 (1mm).

actual var constantBias: Float

Constant bias in world units (e.g., meters) to move shadows away from the light. Ignored for VSM shadow type. Default: 0.001 (1mm).

actual var constantBias: Float

Constant bias in world units (e.g., meters) to move shadows away from the light. Ignored for VSM shadow type. Default: 0.001 (1mm).

Link copied to clipboard
actual var elvsm: Boolean

For VSM shadow type: use Exponential Layered VSM (ELVSM) for improved light leak reduction. Doubles shadow map memory. Mostly useful with large blur widths. Default: false.

expect var elvsm: Boolean

For VSM shadow type: use Exponential Layered VSM (ELVSM) for improved light leak reduction. Doubles shadow map memory. Mostly useful with large blur widths. Default: false.

actual var elvsm: Boolean

For VSM shadow type: use Exponential Layered VSM (ELVSM) for improved light leak reduction. Doubles shadow map memory. Mostly useful with large blur widths. Default: false.

actual var elvsm: Boolean

For VSM shadow type: use Exponential Layered VSM (ELVSM) for improved light leak reduction. Doubles shadow map memory. Mostly useful with large blur widths. Default: false.

actual var elvsm: Boolean

For VSM shadow type: use Exponential Layered VSM (ELVSM) for improved light leak reduction. Doubles shadow map memory. Mostly useful with large blur widths. Default: false.

Link copied to clipboard
actual var lispsm: Boolean

Light-space perspective shadow mapping (LiSPSM) improves effective shadow resolution without cascades. Incompatible with large blur widths. Disable if blurring artifacts become problematic (only relevant for VSM with blur or PCSS shadow types). Automatically disabled if stable is true. Default: true.

expect var lispsm: Boolean

Light-space perspective shadow mapping (LiSPSM) improves effective shadow resolution without cascades. Incompatible with large blur widths. Disable if blurring artifacts become problematic (only relevant for VSM with blur or PCSS shadow types). Automatically disabled if stable is true. Default: true.

actual var lispsm: Boolean

Light-space perspective shadow mapping (LiSPSM) improves effective shadow resolution without cascades. Incompatible with large blur widths. Disable if blurring artifacts become problematic (only relevant for VSM with blur or PCSS shadow types). Automatically disabled if stable is true. Default: true.

actual var lispsm: Boolean

Light-space perspective shadow mapping (LiSPSM) improves effective shadow resolution without cascades. Incompatible with large blur widths. Disable if blurring artifacts become problematic (only relevant for VSM with blur or PCSS shadow types). Automatically disabled if stable is true. Default: true.

actual var lispsm: Boolean

Light-space perspective shadow mapping (LiSPSM) improves effective shadow resolution without cascades. Incompatible with large blur widths. Disable if blurring artifacts become problematic (only relevant for VSM with blur or PCSS shadow types). Automatically disabled if stable is true. Default: true.

Link copied to clipboard
actual var mapSize: Int

Size of the shadow map in texels. Must be a power of two and at least 8. Default: 1024. Larger values improve shadow quality but hurt performance.

expect var mapSize: Int

Size of the shadow map in texels. Must be a power of two and at least 8. Default: 1024. Larger values improve shadow quality but hurt performance.

actual var mapSize: Int

Size of the shadow map in texels. Must be a power of two and at least 8. Default: 1024. Larger values improve shadow quality but hurt performance.

actual var mapSize: Int

Size of the shadow map in texels. Must be a power of two and at least 8. Default: 1024. Larger values improve shadow quality but hurt performance.

actual var mapSize: Int

Size of the shadow map in texels. Must be a power of two and at least 8. Default: 1024. Larger values improve shadow quality but hurt performance.

Link copied to clipboard

Maximum shadow-occluder distance for SSCS in world units. (ignored for non-directional lights). Default: 0.3 (30 cm).

Maximum shadow-occluder distance for SSCS in world units. (ignored for non-directional lights). Default: 0.3 (30 cm).

Maximum shadow-occluder distance for SSCS in world units. (ignored for non-directional lights). Default: 0.3 (30 cm).

Maximum shadow-occluder distance for SSCS in world units. (ignored for non-directional lights). Default: 0.3 (30 cm).

Maximum shadow-occluder distance for SSCS in world units. (ignored for non-directional lights). Default: 0.3 (30 cm).

Link copied to clipboard
actual var normalBias: Float

Scale for maximum sampling error to move shadows away from fragment normals. Should typically be 1.0. Ignored for VSM shadow type. Default: 1.0.

expect var normalBias: Float

Scale for maximum sampling error to move shadows away from fragment normals. Should typically be 1.0. Ignored for VSM shadow type. Default: 1.0.

actual var normalBias: Float

Scale for maximum sampling error to move shadows away from fragment normals. Should typically be 1.0. Ignored for VSM shadow type. Default: 1.0.

actual var normalBias: Float

Scale for maximum sampling error to move shadows away from fragment normals. Should typically be 1.0. Ignored for VSM shadow type. Default: 1.0.

actual var normalBias: Float

Scale for maximum sampling error to move shadows away from fragment normals. Should typically be 1.0. Ignored for VSM shadow type. Default: 1.0.

Link copied to clipboard

Enable screen-space contact shadows (SSCS) for more detailed shadow transitions. Useful in large scenes; adds overhead. Applies regardless of shadow-caster status. Default: false.

Enable screen-space contact shadows (SSCS) for more detailed shadow transitions. Useful in large scenes; adds overhead. Applies regardless of shadow-caster status. Default: false.

Enable screen-space contact shadows (SSCS) for more detailed shadow transitions. Useful in large scenes; adds overhead. Applies regardless of shadow-caster status. Default: false.

Enable screen-space contact shadows (SSCS) for more detailed shadow transitions. Useful in large scenes; adds overhead. Applies regardless of shadow-caster status. Default: false.

Enable screen-space contact shadows (SSCS) for more detailed shadow transitions. Useful in large scenes; adds overhead. Applies regardless of shadow-caster status. Default: false.

Link copied to clipboard

Light bulb radius for soft shadow effects (DPCF/PCSS only). Default: 0.02 (2 cm).

Light bulb radius for soft shadow effects (DPCF/PCSS only). Default: 0.02 (2 cm).

Light bulb radius for soft shadow effects (DPCF/PCSS only). Default: 0.02 (2 cm).

Light bulb radius for soft shadow effects (DPCF/PCSS only). Default: 0.02 (2 cm).

Light bulb radius for soft shadow effects (DPCF/PCSS only). Default: 0.02 (2 cm).

Link copied to clipboard
actual var shadowCascades: Int

Number of shadow cascades (1-4). Values > 1 enable Cascaded Shadow Mapping (CSM). Only applicable to directional lights. When using cascades, cascadeSplitPositions must also be set. Default: 1.

expect var shadowCascades: Int

Number of shadow cascades (1-4). Values > 1 enable Cascaded Shadow Mapping (CSM). Only applicable to directional lights. When using cascades, cascadeSplitPositions must also be set. Default: 1.

actual var shadowCascades: Int

Number of shadow cascades (1-4). Values > 1 enable Cascaded Shadow Mapping (CSM). Only applicable to directional lights. When using cascades, cascadeSplitPositions must also be set. Default: 1.

actual var shadowCascades: Int

Number of shadow cascades (1-4). Values > 1 enable Cascaded Shadow Mapping (CSM). Only applicable to directional lights. When using cascades, cascadeSplitPositions must also be set. Default: 1.

actual var shadowCascades: Int

Number of shadow cascades (1-4). Values > 1 enable Cascaded Shadow Mapping (CSM). Only applicable to directional lights. When using cascades, cascadeSplitPositions must also be set. Default: 1.

Link copied to clipboard
actual var shadowFar: Float

Distance from camera after which shadows are clipped (directional lights only). Use 0.0 to use the camera's far distance. Improves quality and performance by discarding distant shadows that don't contribute. Default: 0.0.

expect var shadowFar: Float

Distance from camera after which shadows are clipped (directional lights only). Use 0.0 to use the camera's far distance. Improves quality and performance by discarding distant shadows that don't contribute. Default: 0.0.

actual var shadowFar: Float

Distance from camera after which shadows are clipped (directional lights only). Use 0.0 to use the camera's far distance. Improves quality and performance by discarding distant shadows that don't contribute. Default: 0.0.

actual var shadowFar: Float

Distance from camera after which shadows are clipped (directional lights only). Use 0.0 to use the camera's far distance. Improves quality and performance by discarding distant shadows that don't contribute. Default: 0.0.

actual var shadowFar: Float

Distance from camera after which shadows are clipped (directional lights only). Use 0.0 to use the camera's far distance. Improves quality and performance by discarding distant shadows that don't contribute. Default: 0.0.

Link copied to clipboard
actual var shadowFarHint: Float

Optimize shadow quality until this distance. Shadows render behind this distance but may have degraded quality. Use Float.POSITIVE_INFINITY for camera far distance. Default: 100.0.

expect var shadowFarHint: Float

Optimize shadow quality until this distance. Shadows render behind this distance but may have degraded quality. Use Float.POSITIVE_INFINITY for camera far distance. Default: 100.0.

actual var shadowFarHint: Float

Optimize shadow quality until this distance. Shadows render behind this distance but may have degraded quality. Use Float.POSITIVE_INFINITY for camera far distance. Default: 100.0.

actual var shadowFarHint: Float

Optimize shadow quality until this distance. Shadows render behind this distance but may have degraded quality. Use Float.POSITIVE_INFINITY for camera far distance. Default: 100.0.

actual var shadowFarHint: Float

Optimize shadow quality until this distance. Shadows render behind this distance but may have degraded quality. Use Float.POSITIVE_INFINITY for camera far distance. Default: 100.0.

Link copied to clipboard
actual var shadowNearHint: Float

Optimize shadow quality from this distance onward. Shadows render in front of this distance but may have degraded quality. Use 0.0 for camera near distance. Default: 1.0 (1 meter). Quality may degrade when this is reduced significantly.

expect var shadowNearHint: Float

Optimize shadow quality from this distance onward. Shadows render in front of this distance but may have degraded quality. Use 0.0 for camera near distance. Default: 1.0 (1 meter). Quality may degrade when this is reduced significantly.

actual var shadowNearHint: Float

Optimize shadow quality from this distance onward. Shadows render in front of this distance but may have degraded quality. Use 0.0 for camera near distance. Default: 1.0 (1 meter). Quality may degrade when this is reduced significantly.

actual var shadowNearHint: Float

Optimize shadow quality from this distance onward. Shadows render in front of this distance but may have degraded quality. Use 0.0 for camera near distance. Default: 1.0 (1 meter). Quality may degrade when this is reduced significantly.

actual var shadowNearHint: Float

Optimize shadow quality from this distance onward. Shadows render in front of this distance but may have degraded quality. Use 0.0 for camera near distance. Default: 1.0 (1 meter). Quality may degrade when this is reduced significantly.

Link copied to clipboard
actual var stable: Boolean

When true, prioritizes stability over resolution by disabling resolution-enhancing features. Disables LiSPSM. Produces lower-resolution but stable shadows. Default: false.

expect var stable: Boolean

When true, prioritizes stability over resolution by disabling resolution-enhancing features. Disables LiSPSM. Produces lower-resolution but stable shadows. Default: false.

actual var stable: Boolean

When true, prioritizes stability over resolution by disabling resolution-enhancing features. Disables LiSPSM. Produces lower-resolution but stable shadows. Default: false.

actual var stable: Boolean

When true, prioritizes stability over resolution by disabling resolution-enhancing features. Disables LiSPSM. Produces lower-resolution but stable shadows. Default: false.

actual var stable: Boolean

When true, prioritizes stability over resolution by disabling resolution-enhancing features. Disables LiSPSM. Produces lower-resolution but stable shadows. Default: false.

Link copied to clipboard
actual var stepCount: Int

Number of ray-marching steps for SSCS (ignored for non-directional lights). Default: 8.

expect var stepCount: Int

Number of ray-marching steps for SSCS (ignored for non-directional lights). Default: 8.

actual var stepCount: Int

Number of ray-marching steps for SSCS (ignored for non-directional lights). Default: 8.

actual var stepCount: Int

Number of ray-marching steps for SSCS (ignored for non-directional lights). Default: 8.

actual var stepCount: Int

Number of ray-marching steps for SSCS (ignored for non-directional lights). Default: 8.

Link copied to clipboard
actual var transform: FloatArray

Transform the shadow direction via a unit quaternion (artistic use only). Ignored for non-directional lights. Default: identity.

expect var transform: FloatArray

Transform the shadow direction via a unit quaternion (artistic use only). Ignored for non-directional lights. Default: identity.

actual var transform: FloatArray

Transform the shadow direction via a unit quaternion (artistic use only). Ignored for non-directional lights. Default: identity.

actual var transform: FloatArray

Transform the shadow direction via a unit quaternion (artistic use only). Ignored for non-directional lights. Default: identity.

actual var transform: FloatArray

Transform the shadow direction via a unit quaternion (artistic use only). Ignored for non-directional lights. Default: identity.