SunLight constructor

SunLight(
  1. SunSky source, {
  2. bool castsShadow = true,
  3. double intensityScale = 1.0,
  4. int priority = 0,
  5. Vector3? color,
  6. double? intensity,
  7. bool cacheStaticShadows = true,
  8. double shadowSoftness = 0.08,
  9. double shadowMaxDistance = 150.0,
  10. int shadowCascadeCount = 4,
  11. int shadowMapResolution = 1024,
  12. double shadowDepthBias = 0.02,
  13. double shadowNormalBias = 0.02,
  14. double shadowFadeRange = 2.0,
  15. double shadowCascadeSplitLambda = 0.6,
  16. double shadowAmbientStrength = 0.0,
  17. DirectionalShadowFilter shadowFilter = DirectionalShadowFilter.rotatedPoisson,
  18. bool contactShadows = false,
  19. double contactShadowDistance = 0.3,
  20. double angularRadius = 0.005,
  21. 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.priority = 0,
  this.color,
  this.intensity,
  this.cacheStaticShadows = true,
  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.shadowFilter = DirectionalShadowFilter.rotatedPoisson,
  this.contactShadows = false,
  this.contactShadowDistance = 0.3,
  this.angularRadius = 0.005,
  this.shadowCasterFaces = ShadowCasterFaces.front,
});