Table of Contents

Class Environment

Resource for environment nodes (like WorldEnvironment) that define multiple rendering options.

Inheritance
Environment

Remarks

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

  • Glow

  • Tonemap (Auto Exposure)

  • Adjustments

See Also

Properties

adjustment_brightness

The global brightness value of the rendered scene. Effective only if adjustment_enabled is true.

var adjustment_brightness : float = 1.0

Property Value

float

Remarks

  • void set_adjustment_brightness(float value)
  • float get_adjustment_brightness

adjustment_color_correction

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 adjustment_enabled is true.

var adjustment_color_correction : Texture

Property Value

Texture

Remarks

  • void set_adjustment_color_correction(Texture value)
  • Texture get_adjustment_color_correction

adjustment_contrast

The global contrast value of the rendered scene (default value is 1). Effective only if adjustment_enabled is true.

var adjustment_contrast : float = 1.0

Property Value

float

Remarks

  • void set_adjustment_contrast(float value)
  • float get_adjustment_contrast

adjustment_enabled

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.

var adjustment_enabled : bool = false

Property Value

bool

Remarks

  • void set_adjustment_enabled(bool value)
  • bool is_adjustment_enabled

adjustment_saturation

The global color saturation value of the rendered scene (default value is 1). Effective only if adjustment_enabled is true.

var adjustment_saturation : float = 1.0

Property Value

float

Remarks

  • void set_adjustment_saturation(float value)
  • float get_adjustment_saturation

ambient_light_color

The ambient light's Color. Only effective if ambient_light_sky_contribution is lower than 1.0 (exclusive).

var ambient_light_color : Color = Color(0, 0, 0, 1)

Property Value

Color

Remarks

  • void set_ambient_light_color(Color value)
  • Color get_ambient_light_color

ambient_light_energy

The ambient light's energy. The higher the value, the stronger the light. Only effective if ambient_light_sky_contribution is lower than 1.0 (exclusive).

var ambient_light_energy : float = 1.0

Property Value

float

Remarks

  • void set_ambient_light_energy(float value)
  • float get_ambient_light_energy

ambient_light_sky_contribution

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: ambient_light_sky_contribution is internally clamped between 0.0 and 1.0 (inclusive).

var ambient_light_sky_contribution : float = 1.0

Property Value

float

Remarks

  • void set_ambient_light_sky_contribution(float value)
  • float get_ambient_light_sky_contribution

ambient_light_source

The ambient light source to use for rendering materials and global illumination.

var ambient_light_source : int = 0

Property Value

int

Remarks

  • void set_ambient_source(int value)
  • int get_ambient_source

background_camera_feed_id

The ID of the camera feed to show in the background.

var background_camera_feed_id : int = 1

Property Value

int

Remarks

  • void set_camera_feed_id(int value)
  • int get_camera_feed_id

background_canvas_max_layer

The maximum layer ID to display. Only effective when using the Environment.BG_CANVAS background mode.

var background_canvas_max_layer : int = 0

Property Value

int

Remarks

  • void set_canvas_max_layer(int value)
  • int get_canvas_max_layer

background_color

The Color displayed for clear areas of the scene. Only effective when using the Environment.BG_COLOR background mode.

var background_color : Color = Color(0, 0, 0, 1)

Property Value

Color

Remarks

  • void set_bg_color(Color value)
  • Color get_bg_color

background_energy_multiplier

Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.

var background_energy_multiplier : float = 1.0

Property Value

float

Remarks

  • void set_bg_energy_multiplier(float value)
  • float get_bg_energy_multiplier

background_intensity

Luminance of background measured in nits (candela per square meter). Only used when rendering/lights_and_shadows/use_physical_light_units is enabled. The default value is roughly equivalent to the sky at midday.

var background_intensity : float = 30000.0

Property Value

float

Remarks

  • void set_bg_intensity(float value)
  • float get_bg_intensity

background_mode

The background mode. See BGMode for possible values.

var background_mode : int = 0

Property Value

int

Remarks

  • void set_background(int value)
  • int get_background

fog_aerial_perspective

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 background_mode set to Environment.BG_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 far.

var fog_aerial_perspective : float = 0.0

Property Value

float

Remarks

  • void set_fog_aerial_perspective(float value)
  • float get_fog_aerial_perspective

fog_density

The fog density to be used. This is demonstrated in different ways depending on the fog_mode 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.

var fog_density : float = 0.01

Property Value

float

Remarks

  • void set_fog_density(float value)
  • float get_fog_density

fog_depth_begin

The fog's depth starting distance from the camera. Only available when fog_mode is set to Environment.FOG_MODE_DEPTH.

var fog_depth_begin : float = 10.0

Property Value

float

Remarks

  • void set_fog_depth_begin(float value)
  • float get_fog_depth_begin

fog_depth_curve

The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when fog_mode is set to Environment.FOG_MODE_DEPTH.

var fog_depth_curve : float = 1.0

Property Value

float

Remarks

  • void set_fog_depth_curve(float value)
  • float get_fog_depth_curve

fog_depth_end

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 far value. Only available when fog_mode is set to Environment.FOG_MODE_DEPTH.

var fog_depth_end : float = 100.0

Property Value

float

Remarks

  • void set_fog_depth_end(float value)
  • float get_fog_depth_end

fog_enabled

If true, fog effects are enabled.

var fog_enabled : bool = false

Property Value

bool

Remarks

  • void set_fog_enabled(bool value)
  • bool is_fog_enabled

fog_height

The height at which the height fog effect begins.

var fog_height : float = 0.0

Property Value

float

Remarks

  • void set_fog_height(float value)
  • float get_fog_height

fog_height_density

The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.

var fog_height_density : float = 0.0

Property Value

float

Remarks

  • void set_fog_height_density(float value)
  • float get_fog_height_density

fog_light_color

The fog's color.

var fog_light_color : Color = Color(0.518, 0.553, 0.608, 1)

Property Value

Color

Remarks

  • void set_fog_light_color(Color value)
  • Color get_fog_light_color

fog_light_energy

The fog's brightness. Higher values result in brighter fog.

var fog_light_energy : float = 1.0

Property Value

float

Remarks

  • void set_fog_light_energy(float value)
  • float get_fog_light_energy

fog_mode

The fog mode. See FogMode for possible values.

var fog_mode : int = 0

Property Value

int

Remarks

  • void set_fog_mode(int value)
  • int get_fog_mode

fog_sky_affect

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: fog_sky_affect has no visual effect if fog_aerial_perspective is 1.0.

var fog_sky_affect : float = 1.0

Property Value

float

Remarks

  • void set_fog_sky_affect(float value)
  • float get_fog_sky_affect

fog_sun_scatter

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.

var fog_sun_scatter : float = 0.0

Property Value

float

Remarks

  • void set_fog_sun_scatter(float value)
  • float get_fog_sun_scatter

glow_blend_mode

The glow blending mode.

Note: glow_blend_mode has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_blend_mode : int = 2

Property Value

int

Remarks

  • void set_glow_blend_mode(int value)
  • int get_glow_blend_mode

glow_bloom

The bloom's intensity. If set to a value higher than 0, this will make glow visible in areas darker than the glow_hdr_threshold.

var glow_bloom : float = 0.0

Property Value

float

Remarks

  • void set_glow_bloom(float value)
  • float get_glow_bloom

glow_enabled

If true, the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels.

Note: When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method.

Note: When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: glow_levels/*, glow_normalized, glow_strength, glow_blend_mode, glow_mix, glow_map, and glow_map_strength. This implementation is optimized to run on low-end devices and is less flexible as a result.

var glow_enabled : bool = false

Property Value

bool

Remarks

  • void set_glow_enabled(bool value)
  • bool is_glow_enabled

glow_hdr_luminance_cap

The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.

var glow_hdr_luminance_cap : float = 12.0

Property Value

float

Remarks

  • void set_glow_hdr_luminance_cap(float value)
  • float get_glow_hdr_luminance_cap

glow_hdr_scale

The bleed scale of the HDR glow.

var glow_hdr_scale : float = 2.0

Property Value

float

Remarks

  • void set_glow_hdr_bleed_scale(float value)
  • float get_glow_hdr_bleed_scale

glow_hdr_threshold

The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to 2.0), this may need to be below 1.0 for glow to be visible. A value of 0.9 works well in this case. This value also needs to be decreased below 1.0 when using glow in 2D, as 2D rendering is performed in SDR.

var glow_hdr_threshold : float = 1.0

Property Value

float

Remarks

  • void set_glow_hdr_bleed_threshold(float value)
  • float get_glow_hdr_bleed_threshold

glow_intensity

The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to 2.0), this should be increased to 1.5 to compensate.

var glow_intensity : float = 0.8

Property Value

float

Remarks

  • void set_glow_intensity(float value)
  • float get_glow_intensity

glow_levels/1

The intensity of the 1st level of glow. This is the most "local" level (least blurry).

Note: glow_levels/1 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/1 : float = 0.0

Property Value

float

Remarks

glow_levels/2

The intensity of the 2nd level of glow.

Note: glow_levels/2 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/2 : float = 0.0

Property Value

float

Remarks

glow_levels/3

The intensity of the 3rd level of glow.

Note: glow_levels/3 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/3 : float = 1.0

Property Value

float

Remarks

glow_levels/4

The intensity of the 4th level of glow.

Note: glow_levels/4 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/4 : float = 0.0

Property Value

float

Remarks

glow_levels/5

The intensity of the 5th level of glow.

Note: glow_levels/5 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/5 : float = 1.0

Property Value

float

Remarks

glow_levels/6

The intensity of the 6th level of glow.

Note: glow_levels/6 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/6 : float = 0.0

Property Value

float

Remarks

glow_levels/7

The intensity of the 7th level of glow. This is the most "global" level (blurriest).

Note: glow_levels/7 has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_levels/7 : float = 0.0

Property Value

float

Remarks

glow_map

The texture that should be used as a glow map to multiply the resulting glow color according to glow_map_strength. 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: glow_map has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_map : Texture

Property Value

Texture

Remarks

glow_map_strength

How strong of an influence the glow_map 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: glow_map_strength has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_map_strength : float = 0.8

Property Value

float

Remarks

  • void set_glow_map_strength(float value)
  • float get_glow_map_strength

glow_mix

When using the Environment.GLOW_BLEND_MODE_MIX glow_blend_mode, 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 Environment.GLOW_BLEND_MODE_REPLACE.

Note: glow_mix has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_mix : float = 0.05

Property Value

float

Remarks

  • void set_glow_mix(float value)
  • float get_glow_mix

glow_normalized

If true, glow levels will be normalized so that summed together their intensities equal 1.0.

Note: glow_normalized has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_normalized : bool = false

Property Value

bool

Remarks

  • void set_glow_normalized(bool value)
  • bool is_glow_normalized

glow_strength

The strength of the glow effect. This applies as the glow is blurred across the screen and increases 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: glow_strength has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

var glow_strength : float = 1.0

Property Value

float

Remarks

  • void set_glow_strength(float value)
  • float get_glow_strength

reflected_light_source

The reflected (specular) light source.

var reflected_light_source : int = 0

Property Value

int

Remarks

  • void set_reflection_source(int value)
  • int get_reflection_source

sdfgi_bounce_feedback

The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than 0.0 will simulate multiple bounces, resulting in a more realistic appearance. Increasing sdfgi_bounce_feedback generally has no performance impact. See also sdfgi_energy.

Note: Values greater than 0.5 can cause infinite feedback loops and should be avoided in scenes with bright materials.

Note: If sdfgi_bounce_feedback is 0.0, indirect lighting will not be represented in reflections as light will only bounce one time.

var sdfgi_bounce_feedback : float = 0.5

Property Value

float

Remarks

  • void set_sdfgi_bounce_feedback(float value)
  • float get_sdfgi_bounce_feedback

sdfgi_cascade0_distance

Note: This property is linked to sdfgi_min_cell_size and sdfgi_max_distance. Changing its value will automatically change those properties as well.

var sdfgi_cascade0_distance : float = 12.8

Property Value

float

Remarks

  • void set_sdfgi_cascade0_distance(float value)
  • float get_sdfgi_cascade0_distance

sdfgi_cascades

The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, sdfgi_cascades can often be decreased between 1 and 4 to improve performance.

var sdfgi_cascades : int = 4

Property Value

int

Remarks

  • void set_sdfgi_cascades(int value)
  • int get_sdfgi_cascades

sdfgi_enabled

If true, enables signed distance field global illumination for meshes that have their gi_mode set to GeometryInstance3D.GI_MODE_STATIC. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.

Note: SDFGI is only supported in the Forward+ rendering method, not Mobile or Compatibility.

Performance: SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider LightmapGI instead). To improve SDFGI performance, enable rendering/global_illumination/gi/use_half_resolution in the Project Settings.

Note: Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.

var sdfgi_enabled : bool = false

Property Value

bool

Remarks

  • void set_sdfgi_enabled(bool value)
  • bool is_sdfgi_enabled

sdfgi_energy

The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also sdfgi_bounce_feedback.

var sdfgi_energy : float = 1.0

Property Value

float

Remarks

  • void set_sdfgi_energy(float value)
  • float get_sdfgi_energy

sdfgi_max_distance

The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as ReflectionProbe will be used as a fallback.

Note: This property is linked to sdfgi_min_cell_size and sdfgi_cascade0_distance. Changing its value will automatically change those properties as well.

var sdfgi_max_distance : float = 204.8

Property Value

float

Remarks

  • void set_sdfgi_max_distance(float value)
  • float get_sdfgi_max_distance

sdfgi_min_cell_size

The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates.

Note: This property is linked to sdfgi_max_distance and sdfgi_cascade0_distance. Changing its value will automatically change those properties as well.

var sdfgi_min_cell_size : float = 0.2

Property Value

float

Remarks

  • void set_sdfgi_min_cell_size(float value)
  • float get_sdfgi_min_cell_size

sdfgi_normal_bias

The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.

var sdfgi_normal_bias : float = 1.1

Property Value

float

Remarks

  • void set_sdfgi_normal_bias(float value)
  • float get_sdfgi_normal_bias

sdfgi_probe_bias

The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.

var sdfgi_probe_bias : float = 1.1

Property Value

float

Remarks

  • void set_sdfgi_probe_bias(float value)
  • float get_sdfgi_probe_bias

sdfgi_read_sky_light

If true, SDFGI takes the environment lighting into account. This should be set to false for interior scenes.

var sdfgi_read_sky_light : bool = true

Property Value

bool

Remarks

  • void set_sdfgi_read_sky_light(bool value)
  • bool is_sdfgi_reading_sky_light

sdfgi_use_occlusion

If true, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. sdfgi_use_occlusion has a performance impact and should only be enabled when needed.

var sdfgi_use_occlusion : bool = false

Property Value

bool

Remarks

  • void set_sdfgi_use_occlusion(bool value)
  • bool is_sdfgi_using_occlusion

sdfgi_y_scale

The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. sdfgi_y_scale should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis).

var sdfgi_y_scale : int = 1

Property Value

int

Remarks

  • void set_sdfgi_y_scale(int value)
  • int get_sdfgi_y_scale

sky

The Sky resource used for this Environment.

var sky : Sky

Property Value

Sky

Remarks

  • void set_sky(Sky value)
  • Sky get_sky

sky_custom_fov

If set to a value greater than 0.0, overrides the field of view to use for sky rendering. If set to 0.0, the same FOV as the current Camera3D is used for sky rendering.

var sky_custom_fov : float = 0.0

Property Value

float

Remarks

  • void set_sky_custom_fov(float value)
  • float get_sky_custom_fov

sky_rotation

The rotation to use for sky rendering.

var sky_rotation : Vector3 = Vector3(0, 0, 0)

Property Value

Vector3

Remarks

ssao_ao_channel_affect

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.

var ssao_ao_channel_affect : float = 0.0

Property Value

float

Remarks

  • void set_ssao_ao_channel_affect(float value)
  • float get_ssao_ao_channel_affect

ssao_detail

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.

var ssao_detail : float = 0.5

Property Value

float

Remarks

  • void set_ssao_detail(float value)
  • float get_ssao_detail

ssao_enabled

If true, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion.

Note: SSAO is only supported in the Forward+ rendering method, not Mobile or Compatibility.

var ssao_enabled : bool = false

Property Value

bool

Remarks

  • void set_ssao_enabled(bool value)
  • bool is_ssao_enabled

ssao_horizon

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.

var ssao_horizon : float = 0.06

Property Value

float

Remarks

  • void set_ssao_horizon(float value)
  • float get_ssao_horizon

ssao_intensity

The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion.

var ssao_intensity : float = 2.0

Property Value

float

Remarks

  • void set_ssao_intensity(float value)
  • float get_ssao_intensity

ssao_light_affect

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.

var ssao_light_affect : float = 0.0

Property Value

float

Remarks

  • void set_ssao_direct_light_affect(float value)
  • float get_ssao_direct_light_affect

ssao_power

The distribution of occlusion. A higher value results in darker occlusion, similar to ssao_intensity, but with a sharper falloff.

var ssao_power : float = 1.5

Property Value

float

Remarks

  • void set_ssao_power(float value)
  • float get_ssao_power

ssao_radius

The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.

var ssao_radius : float = 1.0

Property Value

float

Remarks

  • void set_ssao_radius(float value)
  • float get_ssao_radius

ssao_sharpness

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.

var ssao_sharpness : float = 0.98

Property Value

float

Remarks

  • void set_ssao_sharpness(float value)
  • float get_ssao_sharpness

ssil_enabled

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 light_indirect_energy.

Note: SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility.

var ssil_enabled : bool = false

Property Value

bool

Remarks

  • void set_ssil_enabled(bool value)
  • bool is_ssil_enabled

ssil_intensity

The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.

var ssil_intensity : float = 1.0

Property Value

float

Remarks

  • void set_ssil_intensity(float value)
  • float get_ssil_intensity

ssil_normal_rejection

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.

var ssil_normal_rejection : float = 1.0

Property Value

float

Remarks

  • void set_ssil_normal_rejection(float value)
  • float get_ssil_normal_rejection

ssil_radius

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.

var ssil_radius : float = 5.0

Property Value

float

Remarks

  • void set_ssil_radius(float value)
  • float get_ssil_radius

ssil_sharpness

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.

var ssil_sharpness : float = 0.98

Property Value

float

Remarks

  • void set_ssil_sharpness(float value)
  • float get_ssil_sharpness

ssr_depth_tolerance

The depth tolerance for screen-space reflections.

var ssr_depth_tolerance : float = 0.2

Property Value

float

Remarks

  • void set_ssr_depth_tolerance(float value)
  • float get_ssr_depth_tolerance

ssr_enabled

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.

var ssr_enabled : bool = false

Property Value

bool

Remarks

  • void set_ssr_enabled(bool value)
  • bool is_ssr_enabled

ssr_fade_in

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).

var ssr_fade_in : float = 0.15

Property Value

float

Remarks

  • void set_ssr_fade_in(float value)
  • float get_ssr_fade_in

ssr_fade_out

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).

var ssr_fade_out : float = 2.0

Property Value

float

Remarks

  • void set_ssr_fade_out(float value)
  • float get_ssr_fade_out

ssr_max_steps

The maximum number of steps for screen-space reflections. Higher values are slower.

var ssr_max_steps : int = 64

Property Value

int

Remarks

  • void set_ssr_max_steps(int value)
  • int get_ssr_max_steps

tonemap_exposure

Adjusts the brightness of values before they are provided to the tonemapper. Higher tonemap_exposure values result in a brighter image. See also tonemap_white.

Note: Values provided to the tonemapper will also be multiplied by 2.0 and 1.8 for Environment.TONE_MAPPER_FILMIC and Environment.TONE_MAPPER_ACES respectively to produce a similar apparent brightness as Environment.TONE_MAPPER_LINEAR.

var tonemap_exposure : float = 1.0

Property Value

float

Remarks

  • void set_tonemap_exposure(float value)
  • float get_tonemap_exposure

tonemap_mode

The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.)

var tonemap_mode : int = 0

Property Value

int

Remarks

  • void set_tonemapper(int value)
  • int get_tonemapper

tonemap_white

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, recommended values are between 6.0 and 8.0. Higher values result in less blown out highlights, but may make the scene appear lower contrast. See also tonemap_exposure.

Note: tonemap_white is ignored when using Environment.TONE_MAPPER_LINEAR or Environment.TONE_MAPPER_AGX.

var tonemap_white : float = 1.0

Property Value

float

Remarks

  • void set_tonemap_white(float value)
  • float get_tonemap_white

volumetric_fog_albedo

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.

var volumetric_fog_albedo : Color = Color(1, 1, 1, 1)

Property Value

Color

Remarks

  • void set_volumetric_fog_albedo(Color value)
  • Color get_volumetric_fog_albedo

volumetric_fog_ambient_inject

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. volumetric_fog_ambient_inject has a small performance cost when set above 0.0.

Note: This has no visible effect if volumetric_fog_density is 0.0 or if volumetric_fog_albedo is a fully black color.

var volumetric_fog_ambient_inject : float = 0.0

Property Value

float

Remarks

  • void set_volumetric_fog_ambient_inject(float value)
  • float get_volumetric_fog_ambient_inject

volumetric_fog_anisotropy

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.

var volumetric_fog_anisotropy : float = 0.2

Property Value

float

Remarks

  • void set_volumetric_fog_anisotropy(float value)
  • float get_volumetric_fog_anisotropy

volumetric_fog_density

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 volumetric_fog_density to the lowest non-zero value (0.0001) then increase lights' light_volumetric_fog_energy to values between 10000 and 100000 to compensate for the very low density.

var volumetric_fog_density : float = 0.05

Property Value

float

Remarks

  • void set_volumetric_fog_density(float value)
  • float get_volumetric_fog_density

volumetric_fog_detail_spread

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.

var volumetric_fog_detail_spread : float = 2.0

Property Value

float

Remarks

  • void set_volumetric_fog_detail_spread(float value)
  • float get_volumetric_fog_detail_spread

volumetric_fog_emission

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.

var volumetric_fog_emission : Color = Color(0, 0, 0, 1)

Property Value

Color

Remarks

  • void set_volumetric_fog_emission(Color value)
  • Color get_volumetric_fog_emission

volumetric_fog_emission_energy

The brightness of the emitted light from the volumetric fog.

var volumetric_fog_emission_energy : float = 1.0

Property Value

float

Remarks

  • void set_volumetric_fog_emission_energy(float value)
  • float get_volumetric_fog_emission_energy

volumetric_fog_enabled

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.

var volumetric_fog_enabled : bool = false

Property Value

bool

Remarks

  • void set_volumetric_fog_enabled(bool value)
  • bool is_volumetric_fog_enabled

volumetric_fog_gi_inject

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. volumetric_fog_gi_inject has a small performance cost when set above 0.0.

Note: This has no visible effect if volumetric_fog_density is 0.0 or if volumetric_fog_albedo is a fully black color.

Note: Only VoxelGI and SDFGI (sdfgi_enabled) are taken into account when using volumetric_fog_gi_inject. Global illumination from LightmapGI, ReflectionProbe and SSIL (see ssil_enabled) will be ignored by volumetric fog.

var volumetric_fog_gi_inject : float = 1.0

Property Value

float

Remarks

  • void set_volumetric_fog_gi_inject(float value)
  • float get_volumetric_fog_gi_inject

volumetric_fog_length

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 rendering/environment/volumetric_fog/volume_depth.

var volumetric_fog_length : float = 64.0

Property Value

float

Remarks

  • void set_volumetric_fog_length(float value)
  • float get_volumetric_fog_length

volumetric_fog_sky_affect

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: volumetric_fog_sky_affect also affects FogVolumes, even if volumetric_fog_density is 0.0. If you notice FogVolumes are disappearing when looking towards the sky, set volumetric_fog_sky_affect to 1.0.

var volumetric_fog_sky_affect : float = 1.0

Property Value

float

Remarks

  • void set_volumetric_fog_sky_affect(float value)
  • float get_volumetric_fog_sky_affect

volumetric_fog_temporal_reprojection_amount

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.

var volumetric_fog_temporal_reprojection_amount : float = 0.9

Property Value

float

Remarks

  • void set_volumetric_fog_temporal_reprojection_amount(float value)
  • float get_volumetric_fog_temporal_reprojection_amount

volumetric_fog_temporal_reprojection_enabled

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 light_volumetric_fog_energy set to 0.0 to avoid ghosting.

var volumetric_fog_temporal_reprojection_enabled : bool = true

Property Value

bool

Remarks

  • void set_volumetric_fog_temporal_reprojection_enabled(bool value)
  • bool is_volumetric_fog_temporal_reprojection_enabled

Methods

get_glow_level(int)

Qualifiers: const

Returns the intensity of the glow level idx.

float get_glow_level(int idx)

Parameters

idx int

set_glow_level(int, float)

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.

void set_glow_level(int idx, float intensity)

Parameters

idx int
intensity float