SunLight constructor

SunLight(
  1. SunSky source, {
  2. bool castsShadow = true,
  3. double intensityScale = 1.0,
  4. Vector3? color,
  5. double? intensity,
  6. double shadowSoftness = 0.08,
  7. double shadowMaxDistance = 150.0,
  8. int shadowCascadeCount = 4,
  9. int shadowMapResolution = 1024,
  10. double shadowDepthBias = 0.02,
  11. double shadowNormalBias = 0.02,
  12. double shadowFadeRange = 2.0,
  13. double shadowCascadeSplitLambda = 0.6,
  14. double shadowAmbientStrength = 0.0,
  15. 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,
});