using System; using UnityEngine.Serialization; namespace UnityEngine.Rendering.HighDefinition { /// /// A volume component that holds settings for the ambient occlusion. /// [Serializable, VolumeComponentMenu("Sky/Volumetric Clouds")] [SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))] [HDRPHelpURL("Override-Volumetric-Clouds")] public sealed partial class VolumetricClouds : VolumeComponent { /// /// Struct holding animation data for volumetric clouds. /// Animation data is shared for all cameras, but only updated by the main camera. /// public struct AnimationData { internal Vector2 cloudOffset; internal float verticalShapeOffset; internal float verticalErosionOffset; } /// /// Override current clouds animation data. Can be used to synchronize clouds over the network. /// public static AnimationData animationData { get => HDRenderPipeline.currentPipeline.volumetricClouds.m_CloudsAnimationData; set { HDRenderPipeline.currentPipeline.volumetricClouds.m_CloudsAnimationData = value; } } /// /// Control mode for the volumetric clouds. /// public enum CloudControl { /// Control the volumetric clouds with a set of presets and very few parameters. Simple, /// Control the volumetric clouds by specifing the cloud types and densities. Advanced, /// Control volumetric clouds by providing your own cloud map and properties LUT. Manual } /// /// Controls the quality level for the simple mode. /// public enum CloudSimpleMode { /// Control the volumetric clouds with a set of presets and very few parameters (performance mode). Performance, /// Control the volumetric clouds with a set of presets and very few parameters (quality mode). Quality } /// /// The set of available presets for the simple cloud control mode. /// public enum CloudPresets { /// Smaller clouds that are spread apart. Sparse, /// Medium-sized clouds that partially cover the sky. Cloudy, /// A light layer of cloud that covers the entire sky. Some areas are less dense and let more light through, whereas other areas are more dense and appear darker. Overcast, /// Large dark clouds that cover most of the sky. Stormy, /// Exposes properties that control the shape of the clouds. Custom } /// /// Resolution of the volumetric clouds shadow. /// public enum CloudShadowResolution { /// The volumetric clouds shadow will be 64x64. VeryLow64 = 64, /// The volumetric clouds shadow will be 128x128. Low128 = 128, /// The volumetric clouds shadow will be 256x256. Medium256 = 256, /// The volumetric clouds shadow will be 512x512. High512 = 512, /// The volumetric clouds shadow will be 1024x1024. Ultra1024 = 1024, } /// /// Resolution of the volumetric clouds map. /// public enum CloudMapResolution { /// The volumetric clouds map will be 32x32. Low32x32 = 32, /// The volumetric clouds map will be 64x64. Medium64x64 = 64, /// The volumetric clouds map will be 128x128. High128x128 = 128, /// The volumetric clouds map will be 256x256. Ultra256x256 = 256 } /// /// Controls the erosion noise used for the clouds. /// public enum CloudErosionNoise { /// The erosion noise will be a 32x32x32 worley texture. Worley32, /// The erosion noise will be a 32x32x32 perlin texture. Perlin32, } /// /// The set mode in which the clouds fade in when close to the camera /// public enum CloudFadeInMode { /// The fade in parameters are automatically evaluated. Automatic, /// The fade in parameters are to be defined by the user. Manual } /// /// Enable/Disable the volumetric clouds effect. /// [Tooltip("Enable/Disable the volumetric clouds effect.")] public BoolParameter enable = new BoolParameter(false, BoolParameter.DisplayType.EnumPopup); /// /// Tiling (x,y) of the cloud map. /// [Tooltip("Tiling (x,y) of the cloud map.")] public Vector2Parameter cloudTiling = new Vector2Parameter(new Vector2(1.0f, 1.0f)); /// /// Offset (x,y) of the cloud map. /// [Tooltip("Offset (x,y) of the cloud map.")] public Vector2Parameter cloudOffset = new Vector2Parameter(new Vector2(0.0f, 0.0f)); /// /// Controls the altitude of the bottom of the volumetric clouds volume in meters. /// [Tooltip("Controls the altitude of the bottom of the volumetric clouds volume in meters.")] public MinFloatParameter bottomAltitude = new MinFloatParameter(1200.0f, 0.01f); /// /// Controls the size of the volumetric clouds volume in meters. /// [Tooltip("Controls the size of the volumetric clouds volume in meters.")] public MinFloatParameter altitudeRange = new MinFloatParameter(2000.0f, 100.0f); /// /// Controls the mode in which the clouds fade in when close to the camera's near plane. /// [Tooltip("Controls the mode in which the clouds fade in when close to the camera's near plane.")] public EnumParameter fadeInMode = new EnumParameter(CloudFadeInMode.Automatic); /// /// Controls the minimal distance at which clouds start appearing. /// [Tooltip("Controls the minimal distance at which clouds start appearing.")] public MinFloatParameter fadeInStart = new MinFloatParameter(0.0f, 0.0f); /// /// Controls the distance that it takes for the clouds to reach their complete density. /// [Tooltip("Controls the distance that it takes for the clouds to reach their complete density.")] public MinFloatParameter fadeInDistance = new MinFloatParameter(0.0f, 0.0f); /// /// Controls the number of steps when evaluating the clouds' transmittance. A higher value may lead to a lower noise level and longer view distance, but at a higher cost. /// [Tooltip("Controls the number of steps when evaluating the clouds' transmittance. A higher value may lead to a lower noise level and longer view distance, but at a higher cost.")] public ClampedIntParameter numPrimarySteps = new ClampedIntParameter(64, 32, 1024); /// /// Controls the number of steps when evaluating the clouds' lighting. A higher value will lead to smoother lighting and improved self-shadowing, but at a higher cost. /// [Tooltip("Controls the number of steps when evaluating the clouds' lighting. A higher value will lead to smoother lighting and improved self-shadowing, but at a higher cost.")] public ClampedIntParameter numLightSteps = new ClampedIntParameter(6, 1, 32); /// /// Specifies the cloud map - Coverage (R), Rain (G), Type (B). /// [Tooltip("Specifies the cloud map - Coverage (R), Rain (G), Type (B).")] public TextureParameter cloudMap = new TextureParameter(null, TextureDimension.Tex2D); /// /// Specifies the lookup table for the clouds - Profile Coverage (R), Erosion (G), Ambient Occlusion (B). /// [Tooltip("Specifies the lookup table for the clouds - Profile Coverage (R), Erosion (G), Ambient Occlusion (B).")] public TextureParameter cloudLut = new TextureParameter(null, TextureDimension.Tex2D); /// /// Specifies the cloud control Mode: Simple, Advanced or Manual. /// [Tooltip("Specifies the cloud control Mode: Simple, Advanced or Manual.")] public EnumParameter cloudControl = new EnumParameter(CloudControl.Simple); /// /// Specifies the quality mode used to render the volumetric clouds. /// public EnumParameter cloudSimpleMode = new EnumParameter(CloudSimpleMode.Performance); /// /// Specifies the weather preset in Simple mode. /// public CloudPresets cloudPreset { get { return m_CloudPreset.value; } set { m_CloudPreset.value = value; ApplyCurrentCloudPreset(); } } [SerializeField, FormerlySerializedAs("cloudPreset")] private EnumParameter m_CloudPreset = new EnumParameter(CloudPresets.Cloudy); /// /// Specifies the lower cloud layer distribution in the advanced mode. /// [Tooltip("Specifies the lower cloud layer distribution in the advanced mode.")] public TextureParameter cumulusMap = new TextureParameter(null, TextureDimension.Tex2D); /// /// Overrides the coverage of the lower cloud layer specified in the cumulus map in the advanced mode. /// [Tooltip("Overrides the coverage of the lower cloud layer specified in the cumulus map in the advanced mode.")] public ClampedFloatParameter cumulusMapMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Specifies the higher cloud layer distribution in the advanced mode. /// [Tooltip("Specifies the higher cloud layer distribution in the advanced mode.")] public TextureParameter altoStratusMap = new TextureParameter(null, TextureDimension.Tex2D); /// /// Overrides the coverage of the higher cloud layer specified in the alto stratus map in the advanced mode. /// [Tooltip("Overrides the coverage of the higher cloud layer specified in the alto stratus map in the advanced mode.")] public ClampedFloatParameter altoStratusMapMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Specifies the anvil shaped clouds distribution in the advanced mode. /// [Tooltip("Specifies the anvil shaped clouds distribution in the advanced mode.")] public TextureParameter cumulonimbusMap = new TextureParameter(null, TextureDimension.Tex2D); /// /// Overrides the coverage of the anvil shaped clouds specified in the cumulonimbus map in the advanced mode. /// [Tooltip("Overrides the coverage of the anvil shaped clouds specified in the cumulonimbus map in the advanced mode.")] public ClampedFloatParameter cumulonimbusMapMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Specifies the rain distribution in the advanced mode. /// [Tooltip("Specifies the rain distribution in the advanced mode.")] public TextureParameter rainMap = new TextureParameter(null, TextureDimension.Tex2D); /// /// Specifies the internal texture resolution used for the cloud map in the advanced mode. A lower value will lead to higher performance, but less precise cloud type transitions. /// [Tooltip("Specifies the internal texture resolution used for the cloud map in the advanced mode. A lower value will lead to higher performance, but less precise cloud type transitions.")] public EnumParameter cloudMapResolution = new EnumParameter(CloudMapResolution.Medium64x64); /// /// Controls the density (Y axis) of the volumetric clouds as a function of the height (X Axis) inside the cloud volume. /// [Tooltip("Controls the density (Y axis) of the volumetric clouds as a function of the height (X Axis) inside the cloud volume.")] public AnimationCurveParameter densityCurve = new AnimationCurveParameter(new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.15f, 1.0f), new Keyframe(1.0f, 0.1f)), false); /// /// Controls the erosion (Y axis) of the volumetric clouds as a function of the height (X Axis) inside the cloud volume. /// [Tooltip("Controls the erosion (Y axis) of the volumetric clouds as a function of the height (X Axis) inside the cloud volume.")] public AnimationCurveParameter erosionCurve = new AnimationCurveParameter(new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.1f, 0.9f), new Keyframe(1.0f, 1.0f)), false); /// /// Controls the ambient occlusion (Y axis) of the volumetric clouds as a function of the height (X Axis) inside the cloud volume. /// [Tooltip("Controls the ambient occlusion (Y axis) of the volumetric clouds as a function of the height (X Axis) inside the cloud volume.")] public AnimationCurveParameter ambientOcclusionCurve = new AnimationCurveParameter(new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.25f, 0.4f), new Keyframe(1.0f, 0.0f)), false); /// /// Specifies the tint of the cloud scattering color. /// [Tooltip("Specifies the tint of the cloud scattering color.")] public ColorParameter scatteringTint = new ColorParameter(new Color(0.0f, 0.0f, 0.0f, 1.0f)); /// /// Controls the amount of local scattering in the clouds. A higher value may produce a more powdery or diffused aspect. /// [Tooltip("Controls the amount of local scattering in the clouds. A higher value may produce a more powdery or diffused aspect.")] [AdditionalProperty] public ClampedFloatParameter powderEffectIntensity = new ClampedFloatParameter(0.25f, 0.0f, 1.0f); /// /// Controls the amount of multi-scattering inside the cloud. /// [Tooltip("Controls the amount of multi-scattering inside the cloud.")] [AdditionalProperty] public ClampedFloatParameter multiScattering = new ClampedFloatParameter(0.5f, 0.0f, 1.0f); /// /// Controls the global density of the cloud volume. /// [Tooltip("Controls the global density of the cloud volume.")] public ClampedFloatParameter densityMultiplier = new ClampedFloatParameter(0.4f, 0.0f, 1.0f); /// /// Controls the larger noise passing through the cloud coverage. A higher value will yield less cloud coverage and smaller clouds. /// [Tooltip("Controls the larger noise passing through the cloud coverage. A higher value will yield less cloud coverage and smaller clouds.")] public ClampedFloatParameter shapeFactor = new ClampedFloatParameter(0.9f, 0.0f, 1.0f); /// /// Controls the size of the larger noise passing through the cloud coverage. /// [Tooltip("Controls the size of the larger noise passing through the cloud coverage.")] public MinFloatParameter shapeScale = new MinFloatParameter(5.0f, 0.1f); /// /// Controls the world space offset applied when evaluating the larger noise passing through the cloud coverage. /// [Tooltip("Controls the world space offset applied when evaluating the larger noise passing through the cloud coverage.")] public Vector3Parameter shapeOffset = new Vector3Parameter(Vector3.zero); /// /// Controls the smaller noise on the edge of the clouds. A higher value will erode clouds more significantly. /// [Tooltip("Controls the smaller noise on the edge of the clouds. A higher value will erode clouds more significantly.")] public ClampedFloatParameter erosionFactor = new ClampedFloatParameter(0.8f, 0.0f, 1.0f); /// /// Controls the size of the smaller noise passing through the cloud coverage. /// [Tooltip("Controls the size of the smaller noise passing through the cloud coverage.")] public MinFloatParameter erosionScale = new MinFloatParameter(107.0f, 1.0f); /// /// Controls the type of noise used to generate the smaller noise passing through the cloud coverage. /// [Tooltip("Controls the type of noise used to generate the smaller noise passing through the cloud coverage.")] [AdditionalProperty] public EnumParameter erosionNoiseType = new EnumParameter(CloudErosionNoise.Perlin32); /// /// When enabled, an additional noise should be evaluated for the clouds in the advanced and manual modes. This increases signficantly the cost of the volumetric clouds. /// [Tooltip("When enabled, an additional noise should be evaluated for the clouds in the advanced and manual modes. This increases signficantly the cost of the volumetric clouds.")] public BoolParameter microErosion = new BoolParameter(false); /// /// Controls the smallest noise on the edge of the clouds. A higher value will erode clouds more. /// [Tooltip("Controls the smallest noise on the edge of the clouds. A higher value will erode clouds more.")] public ClampedFloatParameter microErosionFactor = new ClampedFloatParameter(0.5f, 0.0f, 1.0f); /// /// Controls the size of the smaller noise passing through the cloud coverage. /// [Tooltip("Controls the size of the smaller noise passing through the cloud coverage.")] public MinFloatParameter microErosionScale = new MinFloatParameter(200.0f, 0.1f); /// /// Controls the influence of the light probes on the cloud volume. A lower value will suppress the ambient light and produce darker clouds overall. /// [Tooltip("Controls the influence of the light probes on the cloud volume. A lower value will suppress the ambient light and produce darker clouds overall.")] public ClampedFloatParameter ambientLightProbeDimmer = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Controls the influence of the sun light on the cloud volume. A lower value will suppress the sun light and produce darker clouds overall. /// [Tooltip("Controls the influence of the sun light on the cloud volume. A lower value will suppress the sun light and produce darker clouds overall.")] public ClampedFloatParameter sunLightDimmer = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Controls how much Erosion Factor is taken into account when computing ambient occlusion. The Erosion Factor parameter is editable in the custom preset, Advanced and Manual Modes. /// [Tooltip("Controls how much Erosion Factor is taken into account when computing ambient occlusion. The Erosion Factor parameter is editable in the custom preset, Advanced and Manual Modes.")] [AdditionalProperty] public ClampedFloatParameter erosionOcclusion = new ClampedFloatParameter(0.1f, 0.0f, 1.0f); /// /// Sets the global horizontal wind speed in kilometers per hour. This value can be relative to the Global Wind Speed defined in the Visual Environment. /// [Tooltip("Sets the global horizontal wind speed in kilometers per hour.\nThis value can be relative to the Global Wind Speed defined in the Visual Environment.")] public WindSpeedParameter globalWindSpeed = new WindSpeedParameter(); /// /// Controls the orientation of the wind relative to the X world vector. This value can be relative to the Global Wind Orientation defined in the Visual Environment. /// [Tooltip("Controls the orientation of the wind relative to the X world vector.\nThis value can be relative to the Global Wind Orientation defined in the Visual Environment.")] public WindOrientationParameter orientation = new WindOrientationParameter(); /// /// Controls the intensity of the wind-based altitude distortion of the clouds. /// [AdditionalProperty] [Tooltip("Controls the intensity of the wind-based altitude distortion of the clouds.")] public ClampedFloatParameter altitudeDistortion = new ClampedFloatParameter(0.25f, -1.0f, 1.0f); /// /// Controls the multiplier to the speed of the cloud map. /// [Tooltip("Controls the multiplier to the speed of the cloud map.")] [AdditionalProperty] public ClampedFloatParameter cloudMapSpeedMultiplier = new ClampedFloatParameter(0.5f, 0.0f, 1.0f); /// /// Controls the multiplier to the speed of the larger cloud shapes. /// [Tooltip("Controls the multiplier to the speed of the larger cloud shapes.")] [AdditionalProperty] public ClampedFloatParameter shapeSpeedMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Controls the multiplier to the speed of the erosion cloud shapes. /// [Tooltip("Controls the multiplier to the speed of the erosion cloud shapes.")] [AdditionalProperty] public ClampedFloatParameter erosionSpeedMultiplier = new ClampedFloatParameter(0.25f, 0.0f, 1.0f); /// /// Controls the vertical wind speed of the larger cloud shapes. /// [Tooltip("Controls the vertical wind speed of the larger cloud shapes.")] [AdditionalProperty] public FloatParameter verticalShapeWindSpeed = new FloatParameter(0.0f); /// /// Controls the vertical wind speed of the erosion cloud shapes. /// [Tooltip("Controls the vertical wind speed of the erosion cloud shapes.")] [AdditionalProperty] public FloatParameter verticalErosionWindSpeed = new FloatParameter(0.0f); /// /// Temporal accumulation increases the visual quality of clouds by decreasing the noise. A higher value will give you better quality but can create ghosting. /// [Tooltip("Temporal accumulation increases the visual quality of clouds by decreasing the noise. A higher value will give you better quality but can create ghosting.")] public ClampedFloatParameter temporalAccumulationFactor = new ClampedFloatParameter(0.95f, 0.0f, 1.0f); /// /// Enable/Disable the volumetric clouds ghosting reduction. When enabled, reduces significantly the ghosting of the volumetric clouds, but may introduce some flickering at lower temporal accumulation factors. /// [Tooltip("Enable/Disable the volumetric clouds ghosting reduction. When enabled, reduces significantly the ghosting of the volumetric clouds, but may introduce some flickering at lower temporal accumulation factors.")] public BoolParameter ghostingReduction = new BoolParameter(true); /// /// Specifies the strength of the perceptual blending for the volumetric clouds. This value should be treated as flag and only be set to 0.0 or 1.0. /// [Tooltip("Specifies the strength of the perceptual blending for the volumetric clouds. This value should be treated as flag and only be set to 0.0 or 1.0.")] public ClampedFloatParameter perceptualBlending = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// When enabled, HDRP evaluates the Volumetric Clouds' shadows. The Volumetric Clouds shadow is rendered independently of the shadow map toggle of the directional light. /// [Tooltip("When enabled, HDRP evaluates the Volumetric Clouds' shadows. The Volumetric Clouds shadow is rendered independently of the shadow map toggle of the directional light.")] public BoolParameter shadows = new BoolParameter(false); /// /// Specifies the resolution of the volumetric clouds shadow map. /// [Tooltip("Specifies the resolution of the volumetric clouds shadow map.")] public EnumParameter shadowResolution = new EnumParameter(CloudShadowResolution.Medium256); /// /// Sets the size of the area covered by shadow around the camera. /// [Tooltip("Sets the size of the area covered by shadow around the camera.")] [AdditionalProperty] public MinFloatParameter shadowDistance = new MinFloatParameter(8000.0f, 1000.0f); /// /// Controls the opacity of the volumetric clouds shadow. /// [Tooltip("Controls the opacity of the volumetric clouds shadow.")] [AdditionalProperty] public ClampedFloatParameter shadowOpacity = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Controls the shadow opacity when outside the area covered by the volumetric clouds shadow. /// [Tooltip("Controls the shadow opacity when outside the area covered by the volumetric clouds shadow.")] [AdditionalProperty] public ClampedFloatParameter shadowOpacityFallback = new ClampedFloatParameter(0.0f, 0.0f, 1.0f); void ApplyCurrentCloudPreset() { // Apply the currently set preset bool microDetails = cloudSimpleMode == CloudSimpleMode.Quality; switch (cloudPreset) { case VolumetricClouds.CloudPresets.Sparse: { densityMultiplier.value = 0.4f; if (microDetails) { shapeFactor.value = 0.925f; shapeScale.value = 5.0f; erosionFactor.value = 0.85f; erosionScale.value = 75.0f; microErosionFactor.value = 0.65f; microErosionScale.value = 300.0f; } else { shapeFactor.value = 0.95f; shapeScale.value = 5.0f; erosionFactor.value = 0.8f; erosionScale.value = 107.0f; } // Curves densityCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.05f, 1.0f), new Keyframe(0.75f, 1.0f), new Keyframe(1.0f, 0.0f)); erosionCurve.value = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.1f, 0.9f), new Keyframe(1.0f, 1.0f)); ambientOcclusionCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.25f, 0.5f), new Keyframe(1.0f, 0.0f)); // Layer properties bottomAltitude.value = 3000.0f; altitudeRange.value = 1000.0f; } break; case VolumetricClouds.CloudPresets.Cloudy: { densityMultiplier.value = 0.4f; if (microDetails) { shapeFactor.value = 0.875f; shapeScale.value = 5.0f; erosionFactor.value = 0.9f; erosionScale.value = 75.0f; microErosionFactor.value = 0.65f; microErosionScale.value = 300.0f; } else { shapeFactor.value = 0.9f; shapeScale.value = 5.0f; erosionFactor.value = 0.8f; erosionScale.value = 107.0f; } // Curves densityCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.15f, 1.0f), new Keyframe(1.0f, 0.1f)); erosionCurve.value = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.1f, 0.9f), new Keyframe(1.0f, 1.0f)); ambientOcclusionCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.25f, 0.4f), new Keyframe(1.0f, 0.0f)); // Layer properties bottomAltitude.value = 1200.0f; altitudeRange.value = 2000.0f; } break; case VolumetricClouds.CloudPresets.Overcast: { densityMultiplier.value = 0.3f; if (microDetails) { shapeFactor.value = 0.45f; shapeScale.value = 5.0f; erosionFactor.value = 0.7f; erosionScale.value = 75.0f; microErosionFactor.value = 0.5f; microErosionScale.value = 300.0f; } else { shapeFactor.value = 0.5f; shapeScale.value = 5.0f; erosionFactor.value = 0.5f; erosionScale.value = 107.0f; } // Curves densityCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.05f, 1.0f), new Keyframe(0.9f, 0.0f), new Keyframe(1.0f, 0.0f)); erosionCurve.value = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.1f, 0.9f), new Keyframe(1.0f, 1.0f)); ambientOcclusionCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(1.0f, 0.0f)); // Layer properties bottomAltitude.value = 1500.0f; altitudeRange.value = 2500.0f; } break; case VolumetricClouds.CloudPresets.Stormy: { densityMultiplier.value = 0.35f; if (microDetails) { shapeFactor.value = 0.825f; shapeScale.value = 5.0f; erosionFactor.value = 0.9f; erosionScale.value = 75.0f; microErosionFactor.value = 0.6f; microErosionScale.value = 300.0f; } else { shapeFactor.value = 0.85f; shapeScale.value = 5.0f; erosionFactor.value = 0.75f; erosionScale.value = 107.0f; } // Curves densityCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.037f, 1.0f), new Keyframe(0.6f, 1.0f), new Keyframe(1.0f, 0.0f)); erosionCurve.value = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.05f, 0.8f), new Keyframe(0.2438f, 0.9498f), new Keyframe(0.5f, 1.0f), new Keyframe(0.93f, 0.9268f), new Keyframe(1.0f, 1.0f)); ambientOcclusionCurve.value = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.1f, 0.4f), new Keyframe(1.0f, 0.0f)); // Layer properties bottomAltitude.value = 1000.0f; altitudeRange.value = 5000.0f; } break; default: break; } } VolumetricClouds() { displayName = "Volumetric Clouds"; } } }