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 vignetteEnabled = false,
  27. double vignetteIntensity = 0.5,
  28. double vignetteRadius = 0.75,
  29. double vignetteSmoothness = 0.5,
  30. bool chromaticAberrationEnabled = false,
  31. double chromaticAberrationIntensity = 0.2,
  32. bool filmGrainEnabled = false,
  33. double filmGrainIntensity = 0.3,
  34. bool ambientOcclusionEnabled = false,
  35. AmbientOcclusionMethod ambientOcclusionMethod = AmbientOcclusionMethod.obscurance,
  36. double ambientOcclusionRadius = 0.33,
  37. double ambientOcclusionIntensity = 1.0,
  38. double ambientOcclusionBias = 0.07,
  39. double ambientOcclusionPower = 1.5,
  40. double ambientOcclusionDetail = 0.5,
  41. double ambientOcclusionHorizonAngle = 0.06,
  42. double ambientOcclusionDirectLightAffect = 0.0,
  43. double ambientOcclusionMultiBounce = 0.0,
  44. int ambientOcclusionSampleCount = 16,
  45. int ambientOcclusionSliceCount = 3,
  46. int ambientOcclusionStepsPerSlice = 3,
  47. bool ambientOcclusionVisibilityBitmask = false,
  48. double ambientOcclusionThickness = 0.5,
  49. double ambientOcclusionThicknessHeuristic = 0.004,
  50. bool ambientOcclusionBentNormals = false,
  51. double ambientOcclusionIndirectLight = 0.0,
  52. bool ambientOcclusionHalfResolution = true,
  53. bool ambientOcclusionDepthMipChain = false,
  54. SpecularAmbientOcclusionMode ambientOcclusionSpecularMode = SpecularAmbientOcclusionMode.none,
  55. bool screenSpaceReflectionsEnabled = false,
  56. double screenSpaceReflectionsIntensity = 1.0,
  57. double screenSpaceReflectionsMaxDistance = 24.4,
  58. double screenSpaceReflectionsThickness = 0.46,
  59. double screenSpaceReflectionsStride = 9.0,
  60. int screenSpaceReflectionsMaxSteps = 90,
  61. double screenSpaceReflectionsBlur = 0.3,
  62. double screenSpaceReflectionsDistanceFadeStart = 0.0,
  63. double screenSpaceReflectionsResolutionScale = 1.0,
  64. bool fogEnabled = false,
  65. FogMode fogMode = FogMode.exponential,
  66. Vector3? fogColor,
  67. double fogSkyColorInfluence = 0.0,
  68. double fogDensity = 0.02,
  69. double fogStart = 0.0,
  70. double fogEnd = 200.0,
  71. double fogMaxOpacity = 1.0,
  72. double fogCutoffDistance = 0.0,
  73. double fogHeight = 0.0,
  74. double fogHeightFalloff = 0.0,
  75. double fogSunInScatter = 0.0,
  76. double fogSunInScatterExponent = 8.0,
  77. bool godRaysEnabled = false,
  78. double godRaysIntensity = 1.0,
  79. double godRaysDensity = 0.5,
  80. double godRaysAnisotropy = 0.7,
  81. int godRaysStepCount = 24,
  82. double godRaysMaxDistance = 200.0,
  83. double godRaysJitter = 1.0,
  84. Vector3? godRaysColor,
  85. bool depthOfFieldEnabled = false,
  86. double depthOfFieldFocusDistance = 10.0,
  87. double depthOfFieldFStop = 2.8,
  88. double depthOfFieldFocalLength = 0.0,
  89. double depthOfFieldSensorHeight = 0.024,
  90. double depthOfFieldBlurScale = 1.0,
  91. double depthOfFieldMaxForegroundBlur = 24.0,
  92. double depthOfFieldMaxBackgroundBlur = 32.0,
  93. int depthOfFieldBladeCount = 0,
  94. double depthOfFieldBladeRotation = 0.0,
  95. double depthOfFieldBladeCurvature = 0.0,
  96. DepthOfFieldQuality depthOfFieldQuality = DepthOfFieldQuality.medium,
  97. bool autoExposureEnabled = false,
  98. double autoExposureStrength = 0.55,
  99. double autoExposureCompensation = 0.0,
  100. double autoExposureMinEv = -4.0,
  101. double autoExposureMaxEv = 4.0,
  102. double autoExposureSpeedUp = 3.0,
  103. 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.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.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),
     fogColor = fogColor ?? Vector3(0.6, 0.7, 0.8),
     godRaysColor = godRaysColor ?? Vector3.all(1.0);