Environment
Resource for environment nodes (like WorldEnvironment) that define multiple rendering options.
Resource for environment nodes (like WorldEnvironment) that define multiple rendering options.
Resource for environment nodes (like WorldEnvironment) that define multiple environment operations (such as background Sky or Color, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:
- Depth of Field Blur
- Auto Exposure
- Glow
- Tonemap
- Adjustments
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
EnvironmentConstructor
public Environment();Properties93
AdjustmentBrightnessProperty
public float AdjustmentBrightness { get; set; }Applies a simple brightness adjustment to the rendered image after tonemaping. To adjust scene brightness use Environment.TonemapExposure instead, which is applied before tonemapping and thus less prone to issues with bright colors. Effective only if Environment.AdjustmentEnabled is true.
AdjustmentColorCorrectionProperty
public Texture AdjustmentColorCorrection { get; set; }The Texture2D or Texture3D lookup table (LUT) to use for the built-in post-process color grading. Can use a GradientTexture1D for a 1-dimensional LUT, or a Texture3D for a more complex LUT. Effective only if Environment.AdjustmentEnabled is true.
Note: Color correction does not currently support HDR output due to only supporting values in the SDR (0.0 to 1.0) range.
AdjustmentContrastProperty
public float AdjustmentContrast { get; set; }Increasing Environment.AdjustmentContrast will make dark values darker and bright values brighter. This simple adjustment is applied to the rendered image after tonemaping. When set to a value greater than 1.0, Environment.AdjustmentContrast is prone to clipping colors that become too bright or too dark. Effective only if Environment.AdjustmentEnabled is true.
AdjustmentEnabledProperty
public bool AdjustmentEnabled { get; set; }If true, enables the adjustment_* properties provided by this resource. If false, modifications to the adjustment_* properties will have no effect on the rendered scene.
AdjustmentSaturationProperty
public float AdjustmentSaturation { get; set; }Applies a simple saturation adjustment to the rendered image after tonemaping. When Environment.AdjustmentSaturation is set to 0.0, the rendered image will be fully converted to a grayscale image. Effective only if Environment.AdjustmentEnabled is true.
AmbientLightColorProperty
public Color AmbientLightColor { get; set; }The ambient light's Color. Only effective if Environment.AmbientLightSkyContribution is lower than 1.0 (exclusive).
AmbientLightEnergyProperty
public float AmbientLightEnergy { get; set; }Ambient illumination multiplier for the selected source. Color at 1 lights the example geometry without Key. Does not produce directional shadows or GI color transfer between objects.
AmbientLightSkyContributionProperty
public float AmbientLightSkyContribution { get; set; }Defines the amount of light that the sky brings on the scene. A value of 0.0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1.0 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
Note: Environment.AmbientLightSkyContribution is internally clamped between 0.0 and 1.0 (inclusive).
AmbientLightSourceProperty
public Environment.AmbientSource AmbientLightSource { get; set; }Ambient illumination source. Color uses AmbientLightColor and AmbientLightEnergy; Disabled removes ambient. Explicit selection separates illumination from BackgroundMode. Color without direct lights is verified.
BackgroundCameraFeedIdProperty
public int BackgroundCameraFeedId { get; set; }The ID of the camera feed to show in the background.
BackgroundCanvasMaxLayerProperty
public int BackgroundCanvasMaxLayer { get; set; }The maximum layer ID to display. Only effective when using the Environment.BGMode.Canvas background mode.
BackgroundColorProperty
public Color BackgroundColor { get; set; }Background color for the selected BackgroundMode. Does not by itself enable ambient lighting or assign the resource to a camera/world. Use BGMode.Color and explicitly select AmbientLightSource for a predictable setup.
BackgroundEnergyMultiplierProperty
public float BackgroundEnergyMultiplier { get; set; }Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.
BackgroundIntensityProperty
public float BackgroundIntensity { get; set; }Luminance of background measured in nits (candela per square meter). Only used when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units is enabled. The default value is roughly equivalent to the sky at midday.
BackgroundModeProperty
public Environment.BGMode BackgroundMode { get; set; }Background source: for example Color uses BackgroundColor, while Sky requires a configured Sky. Separate from ambient/reflection sources; an attractive background does not guarantee illuminated geometry.
FogAerialPerspectiveProperty
public float FogAerialPerspective { get; set; }If set above 0.0 (exclusive), blends between the fog's color and the color of the background Sky, as read from the radiance cubemap. This has a small performance cost when set above 0.0. Must have Environment.BackgroundMode set to Environment.BGMode.Sky.
This is useful to simulate aerial perspective in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to 1.0, the fog color comes completely from the Sky. If set to 0.0, aerial perspective is disabled.
Notice that this does not sample the Sky directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of Camera3D.Far.
FogDensityProperty
public float FogDensity { get; set; }The fog density to be used. This is demonstrated in different ways depending on the Environment.FogMode mode chosen:
Exponential Fog Mode: Higher values result in denser fog. The fog rendering is exponential like in real life.
Depth Fog mode: The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At 1.0 the fog will fully obscure the scene, at 0.0 the fog will not be visible.
FogDepthBeginProperty
public float FogDepthBegin { get; set; }The fog's depth starting distance from the camera. Only available when Environment.FogMode is set to Environment.FogModeEnum.Depth.
FogDepthCurveProperty
public float FogDepthCurve { get; set; }The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when Environment.FogMode is set to Environment.FogModeEnum.Depth.
FogDepthEndProperty
public float FogDepthEnd { get; set; }The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's Camera3D.Far value. Only available when Environment.FogMode is set to Environment.FogModeEnum.Depth.
FogEnabledProperty
public bool FogEnabled { get; set; }Enables regular environment fog. Frame changes are verified for FogDensity 0 versus 0.15 within the same active mode. Separate from VolumetricFogEnabled; not evidence of volumetric light shafts in Compatibility.
FogHeightProperty
public float FogHeight { get; set; }The height at which the height fog effect begins.
FogHeightDensityProperty
public float FogHeightDensity { get; set; }The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
FogLightColorProperty
public Color FogLightColor { get; set; }The fog's color.
FogLightEnergyProperty
public float FogLightEnergy { get; set; }The fog's brightness. Higher values result in brighter fog.
FogModeProperty
public Environment.FogModeEnum FogMode { get; set; }The fog mode.
FogSkyAffectProperty
public float FogSkyAffect { get; set; }The factor to use when affecting the sky with non-volumetric fog. 1.0 means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with 0.0 not affecting sky rendering at all.
Note: Environment.FogSkyAffect has no visual effect if Environment.FogAerialPerspective is 1.0.
FogSunScatterProperty
public float FogSunScatter { get; set; }If set above 0.0, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog.
GlowBlendModeProperty
public Environment.GlowBlendModeEnum GlowBlendMode { get; set; }The glow blending mode.
Note: The Compatibility renderer always uses GLOW_BLEND_MODE_SCREEN and Environment.GlowBlendMode will have no effect.
GlowBloomProperty
public float GlowBloom { get; set; }Additional bloom contribution allowing less-bright regions into glow. The isolated verified example uses 0.1; large values can wash out image contrast.
GlowEnabledProperty
public bool GlowEnabled { get; set; }Enables bright-pixel halo processing. Actual glow around an emissive mesh is verified in current Compatibility/OpenGL. Level, blend/map and quality support differs across renderers; glow does not light neighboring objects.
GlowHdrLuminanceCapProperty
public float GlowHdrLuminanceCap { get; set; }The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.
GlowHdrScaleProperty
public float GlowHdrScale { get; set; }Smooths the transition between values that are below and above Environment.GlowHdrThreshold by reducing the amount of glow generated by values that are close to Environment.GlowHdrThreshold. Values above glow_hdr_threshold + glow_hdr_scale will not have glow reduced in this way.
GlowHdrThresholdProperty
public float GlowHdrThreshold { get; set; }Brightness threshold for HDR glow contribution. Consider with Emission, exposure and GlowBloom; it is not a material alpha threshold. The native example uses 0.8 with emission multiplier 8.
GlowIntensityProperty
public float GlowIntensity { get; set; }Added glow intensity. Output also depends on frame brightness, threshold and bloom. The example uses 1.5 for a clear halo, not as a universal quality setting.
GlowMapProperty
public Texture GlowMap { get; set; }The texture that should be used as a glow map to multiply the resulting glow color according to Environment.GlowMapStrength. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored.
Note: The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9).
Note: Environment.GlowMap has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
GlowMapStrengthProperty
public float GlowMapStrength { get; set; }How strong of an influence the Environment.GlowMap should have on the overall glow effect. A strength of 0.0 means the glow map has no influence, while a strength of 1.0 means the glow map has full influence.
Note: If the glow map has black areas, a value of 1.0 can also turn off the glow effect entirely in specific areas of the screen.
Note: Environment.GlowMapStrength has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
GlowMixProperty
public float GlowMix { get; set; }When using the GLOW_BLEND_MODE_MIX Environment.GlowBlendMode, this controls how much the source image is blended with the glow layer. A value of 0.0 makes the glow rendering invisible, while a value of 1.0 is equivalent to GLOW_BLEND_MODE_REPLACE.
Note: Environment.GlowMix has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
GlowNormalizedProperty
public bool GlowNormalized { get; set; }If true, glow levels will be normalized so that summed together their intensities equal 1.0.
Note: Environment.GlowNormalized has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
GlowStrengthProperty
public float GlowStrength { get; set; }The strength that is used when blurring across the screen to generate the glow effect. This affects the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range.
Note: Environment.GlowStrength has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
ReflectedLightSourceProperty
public Environment.ReflectionSource ReflectedLightSource { get; set; }Environment reflection source, separate from BackgroundMode and ambient. Disabled intentionally removes sky reflections in the example; the metal sphere is therefore not a complete environment-lit PBR demonstration.
SdfgiBounceFeedbackProperty
public float SdfgiBounceFeedback { get; set; }Feedback coefficient for repeated indirect-light propagation, default 0.5. Start at 0 when diagnosing growing overexposure. The inspector hint 0…1.99 does not clamp the setter; retaining a higher value does not mean the resulting image is stable or correct. Do not mask energy buildup with camera exposure alone.
SdfgiCascade0DistanceProperty
public float SdfgiCascade0Distance { get; set; }Derived nearest-cascade distance: 64 * SdfgiMinCellSize. Setting D assigns MinCellSize = D / 64, also changing MaxDistance. Not an independent stored setting; recomputed from cell size on load. Use a finite positive distance and do not assign the three linked quantities as independent values.
SdfgiCascadesProperty
public int SdfgiCascades { get; set; }Number of cascades around the camera, default 4. Valid integers are 1…8; invalid values are rejected with an error and must not be used. With MinCellSize unchanged, cascade count changes MaxDistance: 64 * MinCellSize * 2^Cascades. Cell size does not adjust to preserve the previous distance. More cascades require more resources.
SdfgiEnabledProperty
public bool SdfgiEnabled { get; set; }Enables SDFGI for this Environment; defaults to false. Visible only when this resource is actually selected by the current WorldEnvironment/Camera3D and Forward+ is used. Does not create dynamic occluders or replace static-geometry preparation. Enabling the flag does not mean lighting has already converged.
SdfgiEnergyProperty
public float SdfgiEnergy { get; set; }SDFGI indirect-light multiplier, default 1. Not camera exposure and does not change direct-light energy. The setter does not clamp; use a finite nonnegative value. High energy does not repair missing static geometry, incorrect Environment selection or leaks.
SdfgiMaxDistanceProperty
public float SdfgiMaxDistance { get; set; }Derived coverage distance: 64 * SdfgiMinCellSize * 2^SdfgiCascades. Setting D changes MinCellSize to D / (64 * 2^Cascades), also changing Cascade0Distance. Not stored independently in the resource. Choose cascade count first, then set either cell size or one distance. This is finite camera-centered coverage, not infinite GI throughout the world.
SdfgiMinCellSizeProperty
public float SdfgiMinCellSize { get; set; }Nearest-cascade cell size in world units, default 0.2. Use a finite positive value. The inspector hint 0.01…64 does not clamp the setter. Changes both derived distances: Cascade0Distance = 64 * MinCellSize, MaxDistance = Cascade0Distance * 2^Cascades. Smaller cells increase spatial detail without promising free quality improvement.
SdfgiNormalBiasProperty
public float SdfgiNormalBias { get; set; }Normal-directed position offset when applying SDFGI, default 1.1. Distinct from ProbeBias used during probe tracing. Adjust gradually while comparing self-occlusion and leaks; larger values do not guarantee a better frame. The setter forwards the value without automatic correction.
SdfgiProbeBiasProperty
public float SdfgiProbeBias { get; set; }Ray bias used while updating SDFGI probes, default 1.1. Does not replace NormalBias for surface sampling. May help tracing artifacts, but excessive bias can skip nearby occluders. The setter does not clamp; inspect the result on level geometry.
SdfgiReadSkyLightProperty
public bool SdfgiReadSkyLight { get; set; }Include sky lighting in SDFGI; defaults to true. Can be disabled for a closed room after checking other sources. false does not disable the Environment background, a direct DirectionalLight3D or other ambient-light paths.
SdfgiUseOcclusionProperty
public bool SdfgiUseOcclusion { get; set; }Additional SDFGI sampling occlusion, default false. May reduce leaks but adds work and does not repair open or excessively thin geometry. Check image quality and GPU time separately. A stored true value does not prove the effect operates in an unsupported renderer.
SdfgiYScaleProperty
public Environment.SdfgiyScale SdfgiYScale { get; set; }Vertical SDFGI distribution mode: Scale50Percent, Scale75Percent or Scale100Percent; defaults to Scale75Percent. More compact modes change vertical coverage/density, not level geometry scale. Choose for scene height and inspect ceilings, floors and leaks; do not supply an arbitrary enum value.
SkyProperty
public Sky Sky { get; set; }Sky resource for this environment. Displaying it as the background requires BackgroundMode = Sky; ambient/reflected light sources are separate settings. The camera must use the World3D containing this environment.
SkyCustomFovProperty
public float SkyCustomFov { get; set; }Custom sky FOV in degrees; 0 retains the camera projection. Current RD applies it to the background with a single view. It neither changes Camera3D geometry FOV nor guarantees the same behavior in multiview XR.
SkyRotationProperty
public Vector3 SkyRotation { get; set; }Sky orientation as Euler angles in radians. This is neither Camera3D rotation nor inspector degrees. Current RD applies orientation during sky lookup; separate radiance generation does not rotate the same data a second time.
SsaoAOChannelAffectProperty
public float SsaoAOChannelAffect { get; set; }The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than 0 will make the SSAO effect visible in areas darkened by AO textures.
SsaoDetailProperty
public float SsaoDetail { get; set; }Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image.
SsaoEnabledProperty
public bool SsaoEnabled { get; set; }Enables screen-space ambient occlusion. Current Compatibility has a basic Radius/Intensity implementation: intensity 0 versus 3 in the same active post-processing path produces local pixel changes. This does not establish algorithm or full-setting parity with Forward+.
SsaoHorizonProperty
public float SsaoHorizon { get; set; }The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the 0.0-1.0 range. A value of 1.0 results in no occlusion.
SsaoIntensityProperty
public float SsaoIntensity { get; set; }SSAO darkening strength when SsaoEnabled. The controlled example keeps SSAO enabled and changes only 0/3 to avoid confusing occlusion with a post-processing-path change. Not direct-light or physical-shadow strength.
SsaoLightAffectProperty
public float SsaoLightAffect { get; set; }The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than 0 will make the SSAO effect visible in direct light.
SsaoPowerProperty
public float SsaoPower { get; set; }The distribution of occlusion. A higher value results in darker occlusion, similar to Environment.SsaoIntensity, but with a sharper falloff.
SsaoRadiusProperty
public float SsaoRadius { get; set; }SSAO radius scale around visible geometry. Compatibility source applies its own parameter scaling; equal numbers across renderers do not guarantee equal output. The example uses 2.
SsaoSharpnessProperty
public float SsaoSharpness { get; set; }The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
SsilEnabledProperty
public bool SsilEnabled { get; set; }If true, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or VoxelGI. Screen-space indirect lighting is not affected by individual light's Light3D.LightIndirectEnergy.
Note: SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility.
SsilIntensityProperty
public float SsilIntensity { get; set; }The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
SsilNormalRejectionProperty
public float SsilNormalRejection { get; set; }Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera.
SsilRadiusProperty
public float SsilRadius { get; set; }The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources.
SsilSharpnessProperty
public float SsilSharpness { get; set; }The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
SsrDepthToleranceProperty
public float SsrDepthTolerance { get; set; }The depth tolerance for screen-space reflections.
SsrEnabledProperty
public bool SsrEnabled { get; set; }If true, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from VoxelGIs or ReflectionProbes, but are slower and can't reflect surfaces occluded by others.
Note: SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.
Note: SSR is not supported on viewports that have a transparent background (where Viewport.TransparentBg is true).
SsrFadeInProperty
public float SsrFadeIn { get; set; }The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to 0.0).
SsrFadeOutProperty
public float SsrFadeOut { get; set; }The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to 0.0).
SsrMaxStepsProperty
public int SsrMaxSteps { get; set; }The maximum number of steps for screen-space reflections. Higher values are slower.
TonemapAgxContrastProperty
public float TonemapAgxContrast { get; set; }Increasing Environment.TonemapAgxContrast will make dark values darker and bright values brighter. Produces a higher quality result than Environment.AdjustmentContrast without any additional performance cost, but is only available when using the TONE_MAPPER_AGX tonemapper.
TonemapAgxWhiteProperty
public float TonemapAgxWhite { get; set; }The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set Environment.TonemapAgxWhite to at least 6.0. Higher values result in less blown out highlights, but may make the scene appear lower contrast. Environment.TonemapAgxWhite is the same as Environment.TonemapWhite, but is only effective with the TONE_MAPPER_AGX tonemapper. See also Environment.TonemapExposure.
Note: When using the Mobile renderer with Viewport.UseHdr2D disabled, Environment.TonemapAgxWhite is ignored and a white value of 2.0 will always be used instead. Otherwise, Environment.TonemapAgxWhite will be dynamically adjusted at runtime by multiplying it by the parent window's Window.GetOutputMaxLinearValue when using Viewport.UseHdr2D to ensure good behavior with both SDR and HDR output.
TonemapExposureProperty
public float TonemapExposure { get; set; }Adjusts the brightness of values before they are provided to the tonemapper. Higher Environment.TonemapExposure values result in a brighter image. See also Environment.TonemapWhite.
Note: Values provided to the tonemapper will also be multiplied by 2.0 and 1.8 for TONE_MAPPER_FILMIC and TONE_MAPPER_ACES respectively to produce a similar apparent brightness as TONE_MAPPER_LINEAR.
TonemapModeProperty
public Environment.ToneMapper TonemapMode { get; set; }Output tone-mapping method. The verified example holds Linear constant across comparisons. Reassess lights and glow when changing tone mapping, exposure or renderer; one preset does not guarantee identical output everywhere.
TonemapWhiteProperty
public float TonemapWhite { get; set; }The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set Environment.TonemapWhite to at least 6.0. Higher values result in less blown out highlights, but may make the scene appear lower contrast. Environment.TonemapAgxWhite will be used instead when using the TONE_MAPPER_AGX tonemapper. See also Environment.TonemapExposure.
Note: Environment.TonemapWhite must be set to 2.0 or lower on the Mobile renderer to produce bright images.
Note: Environment.TonemapWhite is ignored when using TONE_MAPPER_LINEAR and will be dynamically adjusted at runtime to never be less than the parent window's Window.GetOutputMaxLinearValue when using TONE_MAPPER_REINHARDT with Viewport.UseHdr2D.
VolumetricFogAlbedoProperty
public Color VolumetricFogAlbedo { get; set; }The Color of the volumetric fog when interacting with lights. Mist and fog have an albedo close to Color(1, 1, 1, 1) while smoke has a darker albedo.
VolumetricFogAmbientInjectProperty
public float VolumetricFogAmbientInject { get; set; }Scales the strength of ambient light used in the volumetric fog. A value of 0.0 means that ambient light will not impact the volumetric fog. Environment.VolumetricFogAmbientInject has a small performance cost when set above 0.0.
Note: This has no visible effect if Environment.VolumetricFogDensity is 0.0 or if Environment.VolumetricFogAlbedo is a fully black color.
VolumetricFogAnisotropyProperty
public float VolumetricFogAnisotropy { get; set; }The direction of scattered light as it goes through the volumetric fog. A value close to 1.0 means almost all light is scattered forward. A value close to 0.0 means light is scattered equally in all directions. A value close to -1.0 means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions.
VolumetricFogDensityProperty
public float VolumetricFogDensity { get; set; }The base exponential density of the volumetric fog. Set this to the lowest density you want to have globally. FogVolumes can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life.
A value of 0.0 disables global volumetric fog while allowing FogVolumes to display volumetric fog in specific areas.
To make volumetric fog work as a volumetric lighting solution, set Environment.VolumetricFogDensity to the lowest non-zero value (0.0001) then increase lights' Light3D.LightVolumetricFogEnergy to values between 10000 and 100000 to compensate for the very low density.
VolumetricFogDetailSpreadProperty
public float VolumetricFogDetailSpread { get; set; }The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera.
VolumetricFogEmissionProperty
public Color VolumetricFogEmission { get; set; }The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows.
VolumetricFogEmissionEnergyProperty
public float VolumetricFogEmissionEnergy { get; set; }The brightness of the emitted light from the volumetric fog.
VolumetricFogEnabledProperty
public bool VolumetricFogEnabled { get; set; }Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with FogVolumes and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.
Note: Volumetric fog is only supported in the Forward+ rendering method, not Mobile or Compatibility.
VolumetricFogGIInjectProperty
public float VolumetricFogGIInject { get; set; }Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of 0.0 means that Global Illumination will not impact the volumetric fog. Environment.VolumetricFogGIInject has a small performance cost when set above 0.0.
Note: This has no visible effect if Environment.VolumetricFogDensity is 0.0 or if Environment.VolumetricFogAlbedo is a fully black color.
Note: Only VoxelGI and SDFGI (Environment.SdfgiEnabled) are taken into account when using Environment.VolumetricFogGIInject. Global illumination from LightmapGI, ReflectionProbe and SSIL (see Environment.SsilEnabled) will be ignored by volumetric fog.
VolumetricFogLengthProperty
public float VolumetricFogLength { get; set; }The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also ProjectSettings.rendering/environment/volumetric_fog/volume_depth.
VolumetricFogSkyAffectProperty
public float VolumetricFogSkyAffect { get; set; }The factor to use when affecting the sky with volumetric fog. 1.0 means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with 0.0 not affecting sky rendering at all.
Note: Environment.VolumetricFogSkyAffect also affects FogVolumes, even if Environment.VolumetricFogDensity is 0.0. If you notice FogVolumes are disappearing when looking towards the sky, set Environment.VolumetricFogSkyAffect to 1.0.
VolumetricFogTemporalReprojectionAmountProperty
public float VolumetricFogTemporalReprojectionAmount { get; set; }The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible.
VolumetricFogTemporalReprojectionEnabledProperty
public bool VolumetricFogTemporalReprojectionEnabled { get; set; }Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving FogVolumes and Light3Ds "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving FogVolumes or Light3Ds too fast. Short-lived dynamic lighting effects should have Light3D.LightVolumetricFogEnergy set to 0.0 to avoid ghosting.
Methods188
GetAdjustmentBrightnessfloat
public float GetAdjustmentBrightness();floatGetAdjustmentColorCorrectionTexture
public Texture GetAdjustmentColorCorrection();TextureGetAdjustmentContrastfloat
public float GetAdjustmentContrast();floatGetAdjustmentSaturationfloat
public float GetAdjustmentSaturation();floatGetAmbientLightColorColor
public Color GetAmbientLightColor();ColorGetAmbientLightEnergyfloat
public float GetAmbientLightEnergy();floatGetAmbientLightSkyContributionfloat
public float GetAmbientLightSkyContribution();floatGetAmbientSourceEnvironment.AmbientSource
public Environment.AmbientSource GetAmbientSource();Environment.AmbientSourceGetBackgroundEnvironment.BGMode
public Environment.BGMode GetBackground();Environment.BGModeGetBgColorColor
public Color GetBgColor();ColorGetBgEnergyMultiplierfloat
public float GetBgEnergyMultiplier();floatGetBgIntensityfloat
public float GetBgIntensity();floatGetCameraFeedIdint
public int GetCameraFeedId();intGetCanvasMaxLayerint
public int GetCanvasMaxLayer();intGetFogAerialPerspectivefloat
public float GetFogAerialPerspective();floatGetFogDensityfloat
public float GetFogDensity();floatGetFogDepthBeginfloat
public float GetFogDepthBegin();floatGetFogDepthCurvefloat
public float GetFogDepthCurve();floatGetFogDepthEndfloat
public float GetFogDepthEnd();floatGetFogHeightfloat
public float GetFogHeight();floatGetFogHeightDensityfloat
public float GetFogHeightDensity();floatGetFogLightColorColor
public Color GetFogLightColor();ColorGetFogLightEnergyfloat
public float GetFogLightEnergy();floatGetFogModeEnvironment.FogModeEnum
public Environment.FogModeEnum GetFogMode();Environment.FogModeEnumGetFogSkyAffectfloat
public float GetFogSkyAffect();floatGetFogSunScatterfloat
public float GetFogSunScatter();floatGetGlowBlendModeEnvironment.GlowBlendModeEnum
public Environment.GlowBlendModeEnum GetGlowBlendMode();Environment.GlowBlendModeEnumGetGlowBloomfloat
public float GetGlowBloom();floatGetGlowHdrBleedScalefloat
public float GetGlowHdrBleedScale();floatGetGlowHdrBleedThresholdfloat
public float GetGlowHdrBleedThreshold();floatGetGlowHdrLuminanceCapfloat
public float GetGlowHdrLuminanceCap();floatGetGlowIntensityfloat
public float GetGlowIntensity();floatGetGlowLevelfloat
public float GetGlowLevel(int idx);Returns the intensity of the glow level idx.
| Name | Type | Default |
|---|---|---|
idx | int | — |
floatGetGlowMapTexture
public Texture GetGlowMap();TextureGetGlowMapStrengthfloat
public float GetGlowMapStrength();floatGetGlowMixfloat
public float GetGlowMix();floatGetGlowStrengthfloat
public float GetGlowStrength();floatGetReflectionSourceEnvironment.ReflectionSource
public Environment.ReflectionSource GetReflectionSource();Environment.ReflectionSourceGetSdfgiBounceFeedbackfloat
public float GetSdfgiBounceFeedback();Returns SdfgiBounceFeedback. Feedback coefficient for repeated indirect-light propagation, default 0.5. Start at 0 when diagnosing growing overexposure. The inspector hint 0…1.99 does not clamp the setter; retaining a higher value does not mean the resulting image is stable or correct. Do not mask energy buildup with camera exposure alone.
floatCurrent SdfgiBounceFeedback value from this resource.
GetSdfgiCascade0Distancefloat
public float GetSdfgiCascade0Distance();Returns SdfgiCascade0Distance. Derived nearest-cascade distance: 64 * SdfgiMinCellSize. Setting D assigns MinCellSize = D / 64, also changing MaxDistance. Not an independent stored setting; recomputed from cell size on load. Use a finite positive distance and do not assign the three linked quantities as independent values.
floatCurrent SdfgiCascade0Distance value from this resource.
GetSdfgiCascadesint
public int GetSdfgiCascades();Returns SdfgiCascades. Number of cascades around the camera, default 4. Valid integers are 1…8; invalid values are rejected with an error and must not be used. With MinCellSize unchanged, cascade count changes MaxDistance: 64 * MinCellSize * 2^Cascades. Cell size does not adjust to preserve the previous distance. More cascades require more resources.
intCurrent SdfgiCascades value from this resource.
GetSdfgiEnergyfloat
public float GetSdfgiEnergy();Returns SdfgiEnergy. SDFGI indirect-light multiplier, default 1. Not camera exposure and does not change direct-light energy. The setter does not clamp; use a finite nonnegative value. High energy does not repair missing static geometry, incorrect Environment selection or leaks.
floatCurrent SdfgiEnergy value from this resource.
GetSdfgiMaxDistancefloat
public float GetSdfgiMaxDistance();Returns SdfgiMaxDistance. Derived coverage distance: 64 * SdfgiMinCellSize * 2^SdfgiCascades. Setting D changes MinCellSize to D / (64 * 2^Cascades), also changing Cascade0Distance. Not stored independently in the resource. Choose cascade count first, then set either cell size or one distance. This is finite camera-centered coverage, not infinite GI throughout the world.
floatCurrent SdfgiMaxDistance value from this resource.
GetSdfgiMinCellSizefloat
public float GetSdfgiMinCellSize();Returns SdfgiMinCellSize. Nearest-cascade cell size in world units, default 0.2. Use a finite positive value. The inspector hint 0.01…64 does not clamp the setter. Changes both derived distances: Cascade0Distance = 64 * MinCellSize, MaxDistance = Cascade0Distance * 2^Cascades. Smaller cells increase spatial detail without promising free quality improvement.
floatCurrent SdfgiMinCellSize value from this resource.
GetSdfgiNormalBiasfloat
public float GetSdfgiNormalBias();Returns SdfgiNormalBias. Normal-directed position offset when applying SDFGI, default 1.1. Distinct from ProbeBias used during probe tracing. Adjust gradually while comparing self-occlusion and leaks; larger values do not guarantee a better frame. The setter forwards the value without automatic correction.
floatCurrent SdfgiNormalBias value from this resource.
GetSdfgiProbeBiasfloat
public float GetSdfgiProbeBias();Returns SdfgiProbeBias. Ray bias used while updating SDFGI probes, default 1.1. Does not replace NormalBias for surface sampling. May help tracing artifacts, but excessive bias can skip nearby occluders. The setter does not clamp; inspect the result on level geometry.
floatCurrent SdfgiProbeBias value from this resource.
GetSdfgiYScaleEnvironment.SdfgiyScale
public Environment.SdfgiyScale GetSdfgiYScale();Returns SdfgiYScale. Vertical SDFGI distribution mode: Scale50Percent, Scale75Percent or Scale100Percent; defaults to Scale75Percent. More compact modes change vertical coverage/density, not level geometry scale. Choose for scene height and inspect ceilings, floors and leaks; do not supply an arbitrary enum value.
Environment.SdfgiyScaleCurrent SdfgiYScale value from this resource.
GetSkySky
public Sky GetSky();Sky resource for this environment. Displaying it as the background requires BackgroundMode = Sky; ambient/reflected light sources are separate settings. The camera must use the World3D containing this environment.
SkyAssigned Sky resource, or null.
GetSkyCustomFovfloat
public float GetSkyCustomFov();Custom sky FOV in degrees; 0 retains the camera projection. Current RD applies it to the background with a single view. It neither changes Camera3D geometry FOV nor guarantees the same behavior in multiview XR.
floatStored FOV in degrees, including 0.
GetSkyRotationVector3
public Vector3 GetSkyRotation();Sky orientation as Euler angles in radians. This is neither Camera3D rotation nor inspector degrees. Current RD applies orientation during sky lookup; separate radiance generation does not rotate the same data a second time.
Vector3Stored Vector3 of angles in radians.
GetSsaoAOChannelAffectfloat
public float GetSsaoAOChannelAffect();floatGetSsaoDetailfloat
public float GetSsaoDetail();floatGetSsaoDirectLightAffectfloat
public float GetSsaoDirectLightAffect();floatGetSsaoHorizonfloat
public float GetSsaoHorizon();floatGetSsaoIntensityfloat
public float GetSsaoIntensity();floatGetSsaoPowerfloat
public float GetSsaoPower();floatGetSsaoRadiusfloat
public float GetSsaoRadius();floatGetSsaoSharpnessfloat
public float GetSsaoSharpness();floatGetSsilIntensityfloat
public float GetSsilIntensity();floatGetSsilNormalRejectionfloat
public float GetSsilNormalRejection();floatGetSsilRadiusfloat
public float GetSsilRadius();floatGetSsilSharpnessfloat
public float GetSsilSharpness();floatGetSsrDepthTolerancefloat
public float GetSsrDepthTolerance();floatGetSsrFadeInfloat
public float GetSsrFadeIn();floatGetSsrFadeOutfloat
public float GetSsrFadeOut();floatGetSsrMaxStepsint
public int GetSsrMaxSteps();intGetTonemapAgxContrastfloat
public float GetTonemapAgxContrast();floatGetTonemapAgxWhitefloat
public float GetTonemapAgxWhite();floatGetTonemapExposurefloat
public float GetTonemapExposure();floatGetTonemapWhitefloat
public float GetTonemapWhite();floatGetTonemapperEnvironment.ToneMapper
public Environment.ToneMapper GetTonemapper();Environment.ToneMapperGetVolumetricFogAlbedoColor
public Color GetVolumetricFogAlbedo();ColorGetVolumetricFogAmbientInjectfloat
public float GetVolumetricFogAmbientInject();floatGetVolumetricFogAnisotropyfloat
public float GetVolumetricFogAnisotropy();floatGetVolumetricFogDensityfloat
public float GetVolumetricFogDensity();floatGetVolumetricFogDetailSpreadfloat
public float GetVolumetricFogDetailSpread();floatGetVolumetricFogEmissionColor
public Color GetVolumetricFogEmission();ColorGetVolumetricFogEmissionEnergyfloat
public float GetVolumetricFogEmissionEnergy();floatGetVolumetricFogGIInjectfloat
public float GetVolumetricFogGIInject();floatGetVolumetricFogLengthfloat
public float GetVolumetricFogLength();floatGetVolumetricFogSkyAffectfloat
public float GetVolumetricFogSkyAffect();floatGetVolumetricFogTemporalReprojectionAmountfloat
public float GetVolumetricFogTemporalReprojectionAmount();floatIsAdjustmentEnabledbool
public bool IsAdjustmentEnabled();boolIsFogEnabledbool
public bool IsFogEnabled();boolIsGlowEnabledbool
public bool IsGlowEnabled();boolIsGlowNormalizedbool
public bool IsGlowNormalized();boolIsSdfgiEnabledbool
public bool IsSdfgiEnabled();Returns SdfgiEnabled. Enables SDFGI for this Environment; defaults to false. Visible only when this resource is actually selected by the current WorldEnvironment/Camera3D and Forward+ is used. Does not create dynamic occluders or replace static-geometry preparation. Enabling the flag does not mean lighting has already converged.
boolCurrent SdfgiEnabled value from this resource.
IsSdfgiReadingSkyLightbool
public bool IsSdfgiReadingSkyLight();Returns SdfgiReadSkyLight. Include sky lighting in SDFGI; defaults to true. Can be disabled for a closed room after checking other sources. false does not disable the Environment background, a direct DirectionalLight3D or other ambient-light paths.
boolCurrent SdfgiReadSkyLight value from this resource.
IsSdfgiUsingOcclusionbool
public bool IsSdfgiUsingOcclusion();Returns SdfgiUseOcclusion. Additional SDFGI sampling occlusion, default false. May reduce leaks but adds work and does not repair open or excessively thin geometry. Check image quality and GPU time separately. A stored true value does not prove the effect operates in an unsupported renderer.
boolCurrent SdfgiUseOcclusion value from this resource.
IsSsaoEnabledbool
public bool IsSsaoEnabled();boolIsSsilEnabledbool
public bool IsSsilEnabled();boolIsSsrEnabledbool
public bool IsSsrEnabled();boolIsVolumetricFogEnabledbool
public bool IsVolumetricFogEnabled();boolIsVolumetricFogTemporalReprojectionEnabledbool
public bool IsVolumetricFogTemporalReprojectionEnabled();boolSetAdjustmentBrightnessvoid
public void SetAdjustmentBrightness(float brightness);| Name | Type | Default |
|---|---|---|
brightness | float | — |
SetAdjustmentColorCorrectionvoid
public void SetAdjustmentColorCorrection(Texture colorCorrection);| Name | Type | Default |
|---|---|---|
colorCorrection | Texture | — |
SetAdjustmentContrastvoid
public void SetAdjustmentContrast(float contrast);| Name | Type | Default |
|---|---|---|
contrast | float | — |
SetAdjustmentEnabledvoid
public void SetAdjustmentEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetAdjustmentSaturationvoid
public void SetAdjustmentSaturation(float saturation);| Name | Type | Default |
|---|---|---|
saturation | float | — |
SetAmbientLightColorvoid
public void SetAmbientLightColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetAmbientLightEnergyvoid
public void SetAmbientLightEnergy(float energy);| Name | Type | Default |
|---|---|---|
energy | float | — |
SetAmbientLightSkyContributionvoid
public void SetAmbientLightSkyContribution(float ratio);| Name | Type | Default |
|---|---|---|
ratio | float | — |
SetAmbientSourcevoid
public void SetAmbientSource(Environment.AmbientSource source);| Name | Type | Default |
|---|---|---|
source | Environment.AmbientSource | — |
SetBackgroundvoid
public void SetBackground(Environment.BGMode mode);| Name | Type | Default |
|---|---|---|
mode | Environment.BGMode | — |
SetBgColorvoid
public void SetBgColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetBgEnergyMultipliervoid
public void SetBgEnergyMultiplier(float energy);| Name | Type | Default |
|---|---|---|
energy | float | — |
SetBgIntensityvoid
public void SetBgIntensity(float energy);| Name | Type | Default |
|---|---|---|
energy | float | — |
SetCameraFeedIdvoid
public void SetCameraFeedId(int id);| Name | Type | Default |
|---|---|---|
id | int | — |
SetCanvasMaxLayervoid
public void SetCanvasMaxLayer(int layer);| Name | Type | Default |
|---|---|---|
layer | int | — |
SetFogAerialPerspectivevoid
public void SetFogAerialPerspective(float aerialPerspective);| Name | Type | Default |
|---|---|---|
aerialPerspective | float | — |
SetFogDensityvoid
public void SetFogDensity(float density);| Name | Type | Default |
|---|---|---|
density | float | — |
SetFogDepthBeginvoid
public void SetFogDepthBegin(float begin);| Name | Type | Default |
|---|---|---|
begin | float | — |
SetFogDepthCurvevoid
public void SetFogDepthCurve(float curve);| Name | Type | Default |
|---|---|---|
curve | float | — |
SetFogDepthEndvoid
public void SetFogDepthEnd(float end);| Name | Type | Default |
|---|---|---|
end | float | — |
SetFogEnabledvoid
public void SetFogEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetFogHeightvoid
public void SetFogHeight(float height);| Name | Type | Default |
|---|---|---|
height | float | — |
SetFogHeightDensityvoid
public void SetFogHeightDensity(float heightDensity);| Name | Type | Default |
|---|---|---|
heightDensity | float | — |
SetFogLightColorvoid
public void SetFogLightColor(Color lightColor);| Name | Type | Default |
|---|---|---|
lightColor | Color | — |
SetFogLightEnergyvoid
public void SetFogLightEnergy(float lightEnergy);| Name | Type | Default |
|---|---|---|
lightEnergy | float | — |
SetFogModevoid
public void SetFogMode(Environment.FogModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | Environment.FogModeEnum | — |
SetFogSkyAffectvoid
public void SetFogSkyAffect(float skyAffect);| Name | Type | Default |
|---|---|---|
skyAffect | float | — |
SetFogSunScattervoid
public void SetFogSunScatter(float sunScatter);| Name | Type | Default |
|---|---|---|
sunScatter | float | — |
SetGlowBlendModevoid
public void SetGlowBlendMode(Environment.GlowBlendModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | Environment.GlowBlendModeEnum | — |
SetGlowBloomvoid
public void SetGlowBloom(float amount);| Name | Type | Default |
|---|---|---|
amount | float | — |
SetGlowEnabledvoid
public void SetGlowEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetGlowHdrBleedScalevoid
public void SetGlowHdrBleedScale(float scale);| Name | Type | Default |
|---|---|---|
scale | float | — |
SetGlowHdrBleedThresholdvoid
public void SetGlowHdrBleedThreshold(float threshold);| Name | Type | Default |
|---|---|---|
threshold | float | — |
SetGlowHdrLuminanceCapvoid
public void SetGlowHdrLuminanceCap(float amount);| Name | Type | Default |
|---|---|---|
amount | float | — |
SetGlowIntensityvoid
public void SetGlowIntensity(float intensity);| Name | Type | Default |
|---|---|---|
intensity | float | — |
SetGlowLevelvoid
public void SetGlowLevel(int idx, float intensity);Sets the intensity of the glow level idx. A value above 0.0 enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.
| Name | Type | Default |
|---|---|---|
idx | int | — |
intensity | float | — |
SetGlowMapvoid
public void SetGlowMap(Texture mode);| Name | Type | Default |
|---|---|---|
mode | Texture | — |
SetGlowMapStrengthvoid
public void SetGlowMapStrength(float strength);| Name | Type | Default |
|---|---|---|
strength | float | — |
SetGlowMixvoid
public void SetGlowMix(float mix);| Name | Type | Default |
|---|---|---|
mix | float | — |
SetGlowNormalizedvoid
public void SetGlowNormalized(bool normalize);| Name | Type | Default |
|---|---|---|
normalize | bool | — |
SetGlowStrengthvoid
public void SetGlowStrength(float strength);| Name | Type | Default |
|---|---|---|
strength | float | — |
SetReflectionSourcevoid
public void SetReflectionSource(Environment.ReflectionSource source);| Name | Type | Default |
|---|---|---|
source | Environment.ReflectionSource | — |
SetSdfgiBounceFeedbackvoid
public void SetSdfgiBounceFeedback(float amount);Sets SdfgiBounceFeedback. Feedback coefficient for repeated indirect-light propagation, default 0.5. Start at 0 when diagnosing growing overexposure. The inspector hint 0…1.99 does not clamp the setter; retaining a higher value does not mean the resulting image is stable or correct. Do not mask energy buildup with camera exposure alone.
| Name | Type | Default |
|---|---|---|
amount | float | — |
amountNew SdfgiBounceFeedback value; follow the range and dependencies described for the property.
SetSdfgiCascade0Distancevoid
public void SetSdfgiCascade0Distance(float distance);Sets SdfgiCascade0Distance. Derived nearest-cascade distance: 64 * SdfgiMinCellSize. Setting D assigns MinCellSize = D / 64, also changing MaxDistance. Not an independent stored setting; recomputed from cell size on load. Use a finite positive distance and do not assign the three linked quantities as independent values.
| Name | Type | Default |
|---|---|---|
distance | float | — |
distanceNew SdfgiCascade0Distance value; follow the range and dependencies described for the property.
SetSdfgiCascadesvoid
public void SetSdfgiCascades(int amount);Sets SdfgiCascades. Number of cascades around the camera, default 4. Valid integers are 1…8; invalid values are rejected with an error and must not be used. With MinCellSize unchanged, cascade count changes MaxDistance: 64 * MinCellSize * 2^Cascades. Cell size does not adjust to preserve the previous distance. More cascades require more resources.
| Name | Type | Default |
|---|---|---|
amount | int | — |
amountNew SdfgiCascades value; follow the range and dependencies described for the property.
SetSdfgiEnabledvoid
public void SetSdfgiEnabled(bool enabled);Sets SdfgiEnabled. Enables SDFGI for this Environment; defaults to false. Visible only when this resource is actually selected by the current WorldEnvironment/Camera3D and Forward+ is used. Does not create dynamic occluders or replace static-geometry preparation. Enabling the flag does not mean lighting has already converged.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledNew SdfgiEnabled value; follow the range and dependencies described for the property.
SetSdfgiEnergyvoid
public void SetSdfgiEnergy(float amount);Sets SdfgiEnergy. SDFGI indirect-light multiplier, default 1. Not camera exposure and does not change direct-light energy. The setter does not clamp; use a finite nonnegative value. High energy does not repair missing static geometry, incorrect Environment selection or leaks.
| Name | Type | Default |
|---|---|---|
amount | float | — |
amountNew SdfgiEnergy value; follow the range and dependencies described for the property.
SetSdfgiMaxDistancevoid
public void SetSdfgiMaxDistance(float distance);Sets SdfgiMaxDistance. Derived coverage distance: 64 * SdfgiMinCellSize * 2^SdfgiCascades. Setting D changes MinCellSize to D / (64 * 2^Cascades), also changing Cascade0Distance. Not stored independently in the resource. Choose cascade count first, then set either cell size or one distance. This is finite camera-centered coverage, not infinite GI throughout the world.
| Name | Type | Default |
|---|---|---|
distance | float | — |
distanceNew SdfgiMaxDistance value; follow the range and dependencies described for the property.
SetSdfgiMinCellSizevoid
public void SetSdfgiMinCellSize(float size);Sets SdfgiMinCellSize. Nearest-cascade cell size in world units, default 0.2. Use a finite positive value. The inspector hint 0.01…64 does not clamp the setter. Changes both derived distances: Cascade0Distance = 64 * MinCellSize, MaxDistance = Cascade0Distance * 2^Cascades. Smaller cells increase spatial detail without promising free quality improvement.
| Name | Type | Default |
|---|---|---|
size | float | — |
sizeNew SdfgiMinCellSize value; follow the range and dependencies described for the property.
SetSdfgiNormalBiasvoid
public void SetSdfgiNormalBias(float bias);Sets SdfgiNormalBias. Normal-directed position offset when applying SDFGI, default 1.1. Distinct from ProbeBias used during probe tracing. Adjust gradually while comparing self-occlusion and leaks; larger values do not guarantee a better frame. The setter forwards the value without automatic correction.
| Name | Type | Default |
|---|---|---|
bias | float | — |
biasNew SdfgiNormalBias value; follow the range and dependencies described for the property.
SetSdfgiProbeBiasvoid
public void SetSdfgiProbeBias(float bias);Sets SdfgiProbeBias. Ray bias used while updating SDFGI probes, default 1.1. Does not replace NormalBias for surface sampling. May help tracing artifacts, but excessive bias can skip nearby occluders. The setter does not clamp; inspect the result on level geometry.
| Name | Type | Default |
|---|---|---|
bias | float | — |
biasNew SdfgiProbeBias value; follow the range and dependencies described for the property.
SetSdfgiReadSkyLightvoid
public void SetSdfgiReadSkyLight(bool enable);Sets SdfgiReadSkyLight. Include sky lighting in SDFGI; defaults to true. Can be disabled for a closed room after checking other sources. false does not disable the Environment background, a direct DirectionalLight3D or other ambient-light paths.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableNew SdfgiReadSkyLight value; follow the range and dependencies described for the property.
SetSdfgiUseOcclusionvoid
public void SetSdfgiUseOcclusion(bool enable);Sets SdfgiUseOcclusion. Additional SDFGI sampling occlusion, default false. May reduce leaks but adds work and does not repair open or excessively thin geometry. Check image quality and GPU time separately. A stored true value does not prove the effect operates in an unsupported renderer.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableNew SdfgiUseOcclusion value; follow the range and dependencies described for the property.
SetSdfgiYScalevoid
public void SetSdfgiYScale(Environment.SdfgiyScale scale);Sets SdfgiYScale. Vertical SDFGI distribution mode: Scale50Percent, Scale75Percent or Scale100Percent; defaults to Scale75Percent. More compact modes change vertical coverage/density, not level geometry scale. Choose for scene height and inspect ceilings, floors and leaks; do not supply an arbitrary enum value.
| Name | Type | Default |
|---|---|---|
scale | Environment.SdfgiyScale | — |
scaleNew SdfgiYScale value; follow the range and dependencies described for the property.
SetSkyvoid
public void SetSky(Sky sky);Sky resource for this environment. Displaying it as the background requires BackgroundMode = Sky; ambient/reflected light sources are separate settings. The camera must use the World3D containing this environment.
| Name | Type | Default |
|---|---|---|
sky | Sky | — |
skySky resource, or null to clear the assignment.
SetSkyCustomFovvoid
public void SetSkyCustomFov(float scale);Custom sky FOV in degrees; 0 retains the camera projection. Current RD applies it to the background with a single view. It neither changes Camera3D geometry FOV nor guarantees the same behavior in multiview XR.
| Name | Type | Default |
|---|---|---|
scale | float | — |
scaleFOV in degrees; 0 uses camera projection. The parameter name scale does not mean a multiplier.
SetSkyRotationvoid
public void SetSkyRotation(Vector3 eulerRadians);Sky orientation as Euler angles in radians. This is neither Camera3D rotation nor inspector degrees. Current RD applies orientation during sky lookup; separate radiance generation does not rotate the same data a second time.
| Name | Type | Default |
|---|---|---|
eulerRadians | Vector3 | — |
eulerRadiansEuler angles in radians.
SetSsaoAOChannelAffectvoid
public void SetSsaoAOChannelAffect(float amount);| Name | Type | Default |
|---|---|---|
amount | float | — |
SetSsaoDetailvoid
public void SetSsaoDetail(float detail);| Name | Type | Default |
|---|---|---|
detail | float | — |
SetSsaoDirectLightAffectvoid
public void SetSsaoDirectLightAffect(float amount);| Name | Type | Default |
|---|---|---|
amount | float | — |
SetSsaoEnabledvoid
public void SetSsaoEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetSsaoHorizonvoid
public void SetSsaoHorizon(float horizon);| Name | Type | Default |
|---|---|---|
horizon | float | — |
SetSsaoIntensityvoid
public void SetSsaoIntensity(float intensity);| Name | Type | Default |
|---|---|---|
intensity | float | — |
SetSsaoPowervoid
public void SetSsaoPower(float power);| Name | Type | Default |
|---|---|---|
power | float | — |
SetSsaoRadiusvoid
public void SetSsaoRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetSsaoSharpnessvoid
public void SetSsaoSharpness(float sharpness);| Name | Type | Default |
|---|---|---|
sharpness | float | — |
SetSsilEnabledvoid
public void SetSsilEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetSsilIntensityvoid
public void SetSsilIntensity(float intensity);| Name | Type | Default |
|---|---|---|
intensity | float | — |
SetSsilNormalRejectionvoid
public void SetSsilNormalRejection(float normalRejection);| Name | Type | Default |
|---|---|---|
normalRejection | float | — |
SetSsilRadiusvoid
public void SetSsilRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetSsilSharpnessvoid
public void SetSsilSharpness(float sharpness);| Name | Type | Default |
|---|---|---|
sharpness | float | — |
SetSsrDepthTolerancevoid
public void SetSsrDepthTolerance(float depthTolerance);| Name | Type | Default |
|---|---|---|
depthTolerance | float | — |
SetSsrEnabledvoid
public void SetSsrEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetSsrFadeInvoid
public void SetSsrFadeIn(float fadeIn);| Name | Type | Default |
|---|---|---|
fadeIn | float | — |
SetSsrFadeOutvoid
public void SetSsrFadeOut(float fadeOut);| Name | Type | Default |
|---|---|---|
fadeOut | float | — |
SetSsrMaxStepsvoid
public void SetSsrMaxSteps(int maxSteps);| Name | Type | Default |
|---|---|---|
maxSteps | int | — |
SetTonemapAgxContrastvoid
public void SetTonemapAgxContrast(float contrast);| Name | Type | Default |
|---|---|---|
contrast | float | — |
SetTonemapAgxWhitevoid
public void SetTonemapAgxWhite(float white);| Name | Type | Default |
|---|---|---|
white | float | — |
SetTonemapExposurevoid
public void SetTonemapExposure(float exposure);| Name | Type | Default |
|---|---|---|
exposure | float | — |
SetTonemapWhitevoid
public void SetTonemapWhite(float white);| Name | Type | Default |
|---|---|---|
white | float | — |
SetTonemappervoid
public void SetTonemapper(Environment.ToneMapper mode);| Name | Type | Default |
|---|---|---|
mode | Environment.ToneMapper | — |
SetVolumetricFogAlbedovoid
public void SetVolumetricFogAlbedo(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetVolumetricFogAmbientInjectvoid
public void SetVolumetricFogAmbientInject(float enabled);| Name | Type | Default |
|---|---|---|
enabled | float | — |
SetVolumetricFogAnisotropyvoid
public void SetVolumetricFogAnisotropy(float anisotropy);| Name | Type | Default |
|---|---|---|
anisotropy | float | — |
SetVolumetricFogDensityvoid
public void SetVolumetricFogDensity(float density);| Name | Type | Default |
|---|---|---|
density | float | — |
SetVolumetricFogDetailSpreadvoid
public void SetVolumetricFogDetailSpread(float detailSpread);| Name | Type | Default |
|---|---|---|
detailSpread | float | — |
SetVolumetricFogEmissionvoid
public void SetVolumetricFogEmission(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetVolumetricFogEmissionEnergyvoid
public void SetVolumetricFogEmissionEnergy(float begin);| Name | Type | Default |
|---|---|---|
begin | float | — |
SetVolumetricFogEnabledvoid
public void SetVolumetricFogEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetVolumetricFogGIInjectvoid
public void SetVolumetricFogGIInject(float gIInject);| Name | Type | Default |
|---|---|---|
gIInject | float | — |
SetVolumetricFogLengthvoid
public void SetVolumetricFogLength(float length);| Name | Type | Default |
|---|---|---|
length | float | — |
SetVolumetricFogSkyAffectvoid
public void SetVolumetricFogSkyAffect(float skyAffect);| Name | Type | Default |
|---|---|---|
skyAffect | float | — |
SetVolumetricFogTemporalReprojectionAmountvoid
public void SetVolumetricFogTemporalReprojectionAmount(float temporalReprojectionAmount);| Name | Type | Default |
|---|---|---|
temporalReprojectionAmount | float | — |
SetVolumetricFogTemporalReprojectionEnabledvoid
public void SetVolumetricFogTemporalReprojectionEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
Environment.AmbientSource
| Value | Description |
|---|---|
Bg = 0 | Gather ambient light from whichever source is specified as the background. |
Color = 2 | Specify a specific |
Disabled = 1 | Disable ambient light. This provides a slight performance boost over |
Sky = 3 | Gather ambient light from the |
Environment.BGMode
| Value | Description |
|---|---|
CameraFeed = 5 | Displays a camera feed in the background. |
Canvas = 3 | Displays a |
ClearColor = 0 | Clears the background using the clear color defined in |
Color = 1 | Clears the background using a custom clear color. |
Keep = 4 | Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. |
Max = 6 | Represents the size of the |
Sky = 2 | Displays a user-defined sky in the background. |
Environment.FogModeEnum
| Value | Description |
|---|---|
Depth = 1 | Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. |
Exponential = 0 | Use a physically-based fog model defined primarily by fog density. |
Environment.GlowBlendModeEnum
| Value | Description |
|---|---|
Additive = 0 | |
Mix = 4 | |
Replace = 3 | |
Screen = 1 | |
Softlight = 2 |
Environment.ReflectionSource
| Value | Description |
|---|---|
Bg = 0 | Use the background for reflections. |
Disabled = 1 | Disable reflections. This provides a slight performance boost over other options. |
Sky = 2 | Use the |
Environment.SdfgiyScale
| Value | Description |
|---|---|
Scale100Percent = 2 | Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. |
Scale50Percent = 0 | Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. |
Scale75Percent = 1 | Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. |
Environment.ToneMapper
| Value | Description |
|---|---|
Aces = 3 | |
Agx = 4 | |
Filmic = 2 | |
Linear = 0 | |
Reinhardt = 1 |