EnvironmentSettings constructor

EnvironmentSettings({
  1. EnvironmentMap? environment,
  2. Matrix3? environmentTransform,
  3. Skybox? skybox,
  4. SkyEnvironment? skyEnvironment,
  5. SunLight? sunLight,
  6. ToneMappingMode toneMapping = ToneMappingMode.pbrNeutral,
  7. double agxWhite = 16.29,
  8. double agxContrast = 1.25,
  9. double environmentIntensity = 1.0,
  10. double exposure = 1.0,
  11. bool colorGradingEnabled = false,
  12. double brightness = 1.0,
  13. double contrast = 1.0,
  14. double saturation = 1.0,
  15. double temperature = 0.0,
  16. double tint = 0.0,
  17. Vector3? lift,
  18. Vector3? gamma,
  19. Vector3? gain,
  20. ColorLut? colorGradingLut,
  21. double colorGradingLutBlend = 1.0,
  22. bool bloomEnabled = false,
  23. double bloomThreshold = 1.0,
  24. double bloomIntensity = 0.15,
  25. double bloomScatter = 0.7,
  26. bool lensFlareEnabled = false,
  27. double lensFlareIntensity = 1.0,
  28. int lensFlareGhostCount = 4,
  29. double lensFlareGhostSpacing = 0.3,
  30. double lensFlareHaloRadius = 0.35,
  31. double lensFlareHaloIntensity = 1.0,
  32. double lensFlareChromaticAberration = 0.005,
  33. bool vignetteEnabled = false,
  34. double vignetteIntensity = 0.5,
  35. double vignetteRadius = 0.75,
  36. double vignetteSmoothness = 0.5,
  37. bool chromaticAberrationEnabled = false,
  38. double chromaticAberrationIntensity = 0.2,
  39. bool filmGrainEnabled = false,
  40. double filmGrainIntensity = 0.3,
  41. bool ambientOcclusionEnabled = false,
  42. AmbientOcclusionMethod ambientOcclusionMethod = AmbientOcclusionMethod.obscurance,
  43. double ambientOcclusionRadius = 0.33,
  44. double ambientOcclusionIntensity = 1.0,
  45. double ambientOcclusionBias = 0.07,
  46. double ambientOcclusionPower = 1.5,
  47. double ambientOcclusionDetail = 0.5,
  48. double ambientOcclusionHorizonAngle = 0.06,
  49. double ambientOcclusionDirectLightAffect = 0.0,
  50. double ambientOcclusionMultiBounce = 0.0,
  51. int ambientOcclusionSampleCount = 16,
  52. int ambientOcclusionSliceCount = 3,
  53. int ambientOcclusionStepsPerSlice = 3,
  54. bool ambientOcclusionVisibilityBitmask = false,
  55. double ambientOcclusionThickness = 0.5,
  56. double ambientOcclusionThicknessHeuristic = 0.004,
  57. bool ambientOcclusionBentNormals = false,
  58. double ambientOcclusionIndirectLight = 0.0,
  59. bool ambientOcclusionHalfResolution = true,
  60. bool ambientOcclusionDepthMipChain = false,
  61. SpecularAmbientOcclusionMode ambientOcclusionSpecularMode = SpecularAmbientOcclusionMode.none,
  62. bool screenSpaceReflectionsEnabled = false,
  63. double screenSpaceReflectionsIntensity = 1.0,
  64. double screenSpaceReflectionsMaxDistance = 24.4,
  65. double screenSpaceReflectionsThickness = 0.46,
  66. double screenSpaceReflectionsStride = 9.0,
  67. int screenSpaceReflectionsMaxSteps = 90,
  68. double screenSpaceReflectionsBlur = 0.3,
  69. double screenSpaceReflectionsDistanceFadeStart = 0.0,
  70. double screenSpaceReflectionsResolutionScale = 1.0,
  71. bool globalIlluminationEnabled = false,
  72. IrradianceVolumeMode globalIlluminationVolumeMode = IrradianceVolumeMode.followCamera,
  73. Vector3? globalIlluminationResolution,
  74. Vector3? globalIlluminationExtents,
  75. double globalIlluminationIntensity = 1.0,
  76. double globalIlluminationHysteresis = 0.95,
  77. double globalIlluminationShadowBias = 0.3,
  78. double globalIlluminationVisibility = 0.7,
  79. double globalIlluminationVisibilityBias = 0.08,
  80. int globalIlluminationProbeUpdateBudget = 0,
  81. IrradianceInjectionResolution globalIlluminationInjectionResolution = IrradianceInjectionResolution.eighth,
  82. double globalIlluminationFireflyClamp = 8.0,
  83. double globalIlluminationEmissiveBoost = 1.0,
  84. bool globalIlluminationUpdateWhenIdleOnly = false,
  85. bool globalIlluminationBakeOnly = false,
  86. bool fogEnabled = false,
  87. FogMode fogMode = FogMode.exponential,
  88. Vector3? fogColor,
  89. double fogSkyColorInfluence = 0.0,
  90. double fogDensity = 0.02,
  91. double fogStart = 0.0,
  92. double fogEnd = 200.0,
  93. double fogMaxOpacity = 1.0,
  94. double fogCutoffDistance = 0.0,
  95. double fogHeight = 0.0,
  96. double fogHeightFalloff = 0.0,
  97. double fogSunInScatter = 0.0,
  98. double fogSunInScatterExponent = 8.0,
  99. bool godRaysEnabled = false,
  100. double godRaysIntensity = 1.0,
  101. double godRaysDensity = 0.5,
  102. double godRaysAnisotropy = 0.7,
  103. int godRaysStepCount = 24,
  104. double godRaysMaxDistance = 200.0,
  105. double godRaysJitter = 1.0,
  106. Vector3? godRaysColor,
  107. bool depthOfFieldEnabled = false,
  108. double depthOfFieldFocusDistance = 10.0,
  109. double depthOfFieldFStop = 2.8,
  110. double depthOfFieldFocalLength = 0.0,
  111. double depthOfFieldSensorHeight = 0.024,
  112. double depthOfFieldBlurScale = 1.0,
  113. double depthOfFieldMaxForegroundBlur = 24.0,
  114. double depthOfFieldMaxBackgroundBlur = 32.0,
  115. int depthOfFieldBladeCount = 0,
  116. double depthOfFieldBladeRotation = 0.0,
  117. double depthOfFieldBladeCurvature = 0.0,
  118. DepthOfFieldQuality depthOfFieldQuality = DepthOfFieldQuality.medium,
  119. bool autoExposureEnabled = false,
  120. double autoExposureStrength = 0.55,
  121. double autoExposureCompensation = 0.0,
  122. double autoExposureMinEv = -4.0,
  123. double autoExposureMaxEv = 4.0,
  124. double autoExposureSpeedUp = 3.0,
  125. double autoExposureSpeedDown = 1.0,
})

Creates a settings snapshot. Most callers use Scene.environmentSettings or EnvironmentSettings.lerp instead of this directly.

Implementation

EnvironmentSettings({
  this.environment,
  Matrix3? environmentTransform,
  this.skybox,
  this.skyEnvironment,
  this.sunLight,
  this.toneMapping = ToneMappingMode.pbrNeutral,
  this.agxWhite = 16.29,
  this.agxContrast = 1.25,
  this.environmentIntensity = 1.0,
  this.exposure = 1.0,
  this.colorGradingEnabled = false,
  this.brightness = 1.0,
  this.contrast = 1.0,
  this.saturation = 1.0,
  this.temperature = 0.0,
  this.tint = 0.0,
  Vector3? lift,
  Vector3? gamma,
  Vector3? gain,
  this.colorGradingLut,
  this.colorGradingLutBlend = 1.0,
  this.bloomEnabled = false,
  this.bloomThreshold = 1.0,
  this.bloomIntensity = 0.15,
  this.bloomScatter = 0.7,
  this.lensFlareEnabled = false,
  this.lensFlareIntensity = 1.0,
  this.lensFlareGhostCount = 4,
  this.lensFlareGhostSpacing = 0.3,
  this.lensFlareHaloRadius = 0.35,
  this.lensFlareHaloIntensity = 1.0,
  this.lensFlareChromaticAberration = 0.005,
  this.vignetteEnabled = false,
  this.vignetteIntensity = 0.5,
  this.vignetteRadius = 0.75,
  this.vignetteSmoothness = 0.5,
  this.chromaticAberrationEnabled = false,
  this.chromaticAberrationIntensity = 0.2,
  this.filmGrainEnabled = false,
  this.filmGrainIntensity = 0.3,
  this.ambientOcclusionEnabled = false,
  this.ambientOcclusionMethod = AmbientOcclusionMethod.obscurance,
  this.ambientOcclusionRadius = 0.33,
  this.ambientOcclusionIntensity = 1.0,
  this.ambientOcclusionBias = 0.07,
  this.ambientOcclusionPower = 1.5,
  this.ambientOcclusionDetail = 0.5,
  this.ambientOcclusionHorizonAngle = 0.06,
  this.ambientOcclusionDirectLightAffect = 0.0,
  this.ambientOcclusionMultiBounce = 0.0,
  this.ambientOcclusionSampleCount = 16,
  this.ambientOcclusionSliceCount = 3,
  this.ambientOcclusionStepsPerSlice = 3,
  this.ambientOcclusionVisibilityBitmask = false,
  this.ambientOcclusionThickness = 0.5,
  this.ambientOcclusionThicknessHeuristic = 0.004,
  this.ambientOcclusionBentNormals = false,
  this.ambientOcclusionIndirectLight = 0.0,
  this.ambientOcclusionHalfResolution = true,
  this.ambientOcclusionDepthMipChain = false,
  this.ambientOcclusionSpecularMode = SpecularAmbientOcclusionMode.none,
  this.screenSpaceReflectionsEnabled = false,
  this.screenSpaceReflectionsIntensity = 1.0,
  this.screenSpaceReflectionsMaxDistance = 24.4,
  this.screenSpaceReflectionsThickness = 0.46,
  this.screenSpaceReflectionsStride = 9.0,
  this.screenSpaceReflectionsMaxSteps = 90,
  this.screenSpaceReflectionsBlur = 0.3,
  this.screenSpaceReflectionsDistanceFadeStart = 0.0,
  this.screenSpaceReflectionsResolutionScale = 1.0,
  this.globalIlluminationEnabled = false,
  this.globalIlluminationVolumeMode = IrradianceVolumeMode.followCamera,
  Vector3? globalIlluminationResolution,
  Vector3? globalIlluminationExtents,
  this.globalIlluminationIntensity = 1.0,
  this.globalIlluminationHysteresis = 0.95,
  this.globalIlluminationShadowBias = 0.3,
  this.globalIlluminationVisibility = 0.7,
  this.globalIlluminationVisibilityBias = 0.08,
  this.globalIlluminationProbeUpdateBudget = 0,
  this.globalIlluminationInjectionResolution =
      IrradianceInjectionResolution.eighth,
  this.globalIlluminationFireflyClamp = 8.0,
  this.globalIlluminationEmissiveBoost = 1.0,
  this.globalIlluminationUpdateWhenIdleOnly = false,
  this.globalIlluminationBakeOnly = false,
  this.fogEnabled = false,
  this.fogMode = FogMode.exponential,
  Vector3? fogColor,
  this.fogSkyColorInfluence = 0.0,
  this.fogDensity = 0.02,
  this.fogStart = 0.0,
  this.fogEnd = 200.0,
  this.fogMaxOpacity = 1.0,
  this.fogCutoffDistance = 0.0,
  this.fogHeight = 0.0,
  this.fogHeightFalloff = 0.0,
  this.fogSunInScatter = 0.0,
  this.fogSunInScatterExponent = 8.0,
  this.godRaysEnabled = false,
  this.godRaysIntensity = 1.0,
  this.godRaysDensity = 0.5,
  this.godRaysAnisotropy = 0.7,
  this.godRaysStepCount = 24,
  this.godRaysMaxDistance = 200.0,
  this.godRaysJitter = 1.0,
  Vector3? godRaysColor,
  this.depthOfFieldEnabled = false,
  this.depthOfFieldFocusDistance = 10.0,
  this.depthOfFieldFStop = 2.8,
  this.depthOfFieldFocalLength = 0.0,
  this.depthOfFieldSensorHeight = 0.024,
  this.depthOfFieldBlurScale = 1.0,
  this.depthOfFieldMaxForegroundBlur = 24.0,
  this.depthOfFieldMaxBackgroundBlur = 32.0,
  this.depthOfFieldBladeCount = 0,
  this.depthOfFieldBladeRotation = 0.0,
  this.depthOfFieldBladeCurvature = 0.0,
  this.depthOfFieldQuality = DepthOfFieldQuality.medium,
  this.autoExposureEnabled = false,
  this.autoExposureStrength = 0.55,
  this.autoExposureCompensation = 0.0,
  this.autoExposureMinEv = -4.0,
  this.autoExposureMaxEv = 4.0,
  this.autoExposureSpeedUp = 3.0,
  this.autoExposureSpeedDown = 1.0,
}) : environmentTransform = environmentTransform ?? Matrix3.identity(),
     lift = lift ?? Vector3.zero(),
     gamma = gamma ?? Vector3.all(1.0),
     gain = gain ?? Vector3.all(1.0),
     globalIlluminationResolution =
         globalIlluminationResolution ?? Vector3(16, 8, 16),
     globalIlluminationExtents =
         globalIlluminationExtents ?? Vector3(20, 10, 20),
     fogColor = fogColor ?? Vector3(0.6, 0.7, 0.8),
     godRaysColor = godRaysColor ?? Vector3.all(1.0);