SunLight constructor
SunLight(
- SunSky source, {
- bool castsShadow = true,
- double intensityScale = 1.0,
- Vector3? color,
- double? intensity,
- double shadowSoftness = 0.08,
- double shadowMaxDistance = 150.0,
- int shadowCascadeCount = 4,
- int shadowMapResolution = 1024,
- double shadowDepthBias = 0.02,
- double shadowNormalBias = 0.02,
- double shadowFadeRange = 2.0,
- double shadowCascadeSplitLambda = 0.6,
- double shadowAmbientStrength = 0.0,
- ShadowCasterFaces shadowCasterFaces = ShadowCasterFaces.front,
Creates a binding that aims a directional light at source's sun.
color and intensity override the sky-derived sun color and intensity
when non-null; otherwise they follow the sky. intensityScale always
multiplies the final intensity. The shadow fields mirror
DirectionalLight's and are applied to light.
Implementation
SunLight(
this.source, {
this.castsShadow = true,
this.intensityScale = 1.0,
this.color,
this.intensity,
this.shadowSoftness = 0.08,
this.shadowMaxDistance = 150.0,
this.shadowCascadeCount = 4,
this.shadowMapResolution = 1024,
this.shadowDepthBias = 0.02,
this.shadowNormalBias = 0.02,
this.shadowFadeRange = 2.0,
this.shadowCascadeSplitLambda = 0.6,
this.shadowAmbientStrength = 0.0,
this.shadowCasterFaces = ShadowCasterFaces.front,
});