EnvironmentSettings constructor
EnvironmentSettings({
- EnvironmentMap? environment,
- Matrix3? environmentTransform,
- Skybox? skybox,
- SkyEnvironment? skyEnvironment,
- SunLight? sunLight,
- ToneMappingMode toneMapping = ToneMappingMode.pbrNeutral,
- double agxWhite = 16.29,
- double agxContrast = 1.25,
- double environmentIntensity = 1.0,
- double exposure = 1.0,
- bool colorGradingEnabled = false,
- double brightness = 1.0,
- double contrast = 1.0,
- double saturation = 1.0,
- double temperature = 0.0,
- double tint = 0.0,
- Vector3? lift,
- Vector3? gamma,
- Vector3? gain,
- ColorLut? colorGradingLut,
- double colorGradingLutBlend = 1.0,
- bool bloomEnabled = false,
- double bloomThreshold = 1.0,
- double bloomIntensity = 0.15,
- double bloomScatter = 0.7,
- bool vignetteEnabled = false,
- double vignetteIntensity = 0.5,
- double vignetteRadius = 0.75,
- double vignetteSmoothness = 0.5,
- bool chromaticAberrationEnabled = false,
- double chromaticAberrationIntensity = 0.2,
- bool filmGrainEnabled = false,
- double filmGrainIntensity = 0.3,
- bool ambientOcclusionEnabled = false,
- AmbientOcclusionMethod ambientOcclusionMethod = AmbientOcclusionMethod.obscurance,
- double ambientOcclusionRadius = 0.33,
- double ambientOcclusionIntensity = 1.0,
- double ambientOcclusionBias = 0.07,
- double ambientOcclusionPower = 1.5,
- double ambientOcclusionDetail = 0.5,
- double ambientOcclusionHorizonAngle = 0.06,
- double ambientOcclusionDirectLightAffect = 0.0,
- double ambientOcclusionMultiBounce = 0.0,
- int ambientOcclusionSampleCount = 16,
- int ambientOcclusionSliceCount = 3,
- int ambientOcclusionStepsPerSlice = 3,
- bool ambientOcclusionVisibilityBitmask = false,
- double ambientOcclusionThickness = 0.5,
- double ambientOcclusionThicknessHeuristic = 0.004,
- bool ambientOcclusionBentNormals = false,
- double ambientOcclusionIndirectLight = 0.0,
- bool ambientOcclusionHalfResolution = true,
- bool ambientOcclusionDepthMipChain = false,
- SpecularAmbientOcclusionMode ambientOcclusionSpecularMode = SpecularAmbientOcclusionMode.none,
- bool screenSpaceReflectionsEnabled = false,
- double screenSpaceReflectionsIntensity = 1.0,
- double screenSpaceReflectionsMaxDistance = 24.4,
- double screenSpaceReflectionsThickness = 0.46,
- double screenSpaceReflectionsStride = 9.0,
- int screenSpaceReflectionsMaxSteps = 90,
- double screenSpaceReflectionsBlur = 0.3,
- double screenSpaceReflectionsDistanceFadeStart = 0.0,
- double screenSpaceReflectionsResolutionScale = 1.0,
- bool fogEnabled = false,
- FogMode fogMode = FogMode.exponential,
- Vector3? fogColor,
- double fogSkyColorInfluence = 0.0,
- double fogDensity = 0.02,
- double fogStart = 0.0,
- double fogEnd = 200.0,
- double fogMaxOpacity = 1.0,
- double fogCutoffDistance = 0.0,
- double fogHeight = 0.0,
- double fogHeightFalloff = 0.0,
- double fogSunInScatter = 0.0,
- double fogSunInScatterExponent = 8.0,
- bool godRaysEnabled = false,
- double godRaysIntensity = 1.0,
- double godRaysDensity = 0.5,
- double godRaysAnisotropy = 0.7,
- int godRaysStepCount = 24,
- double godRaysMaxDistance = 200.0,
- double godRaysJitter = 1.0,
- Vector3? godRaysColor,
- bool depthOfFieldEnabled = false,
- double depthOfFieldFocusDistance = 10.0,
- double depthOfFieldFStop = 2.8,
- double depthOfFieldFocalLength = 0.0,
- double depthOfFieldSensorHeight = 0.024,
- double depthOfFieldBlurScale = 1.0,
- double depthOfFieldMaxForegroundBlur = 24.0,
- double depthOfFieldMaxBackgroundBlur = 32.0,
- int depthOfFieldBladeCount = 0,
- double depthOfFieldBladeRotation = 0.0,
- double depthOfFieldBladeCurvature = 0.0,
- DepthOfFieldQuality depthOfFieldQuality = DepthOfFieldQuality.medium,
- bool autoExposureEnabled = false,
- double autoExposureStrength = 0.55,
- double autoExposureCompensation = 0.0,
- double autoExposureMinEv = -4.0,
- double autoExposureMaxEv = 4.0,
- double autoExposureSpeedUp = 3.0,
- 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);