Environment

Inherits: Resource < Reference < Object

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

Description

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

If the target Viewport is set to "2D Without Sampling", all post-processing effects will be unavailable. With "3D Without Effects", the following options will be unavailable:

  • Ssao

  • Ss Reflections

This can be configured for the root Viewport with ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation, or for specific Viewports via the Viewport.usage property.

Note that ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation has a mobile platform override to use "3D Without Effects" by default. It improves the performance on mobile devices, but at the same time affects the screen display on mobile devices.

Tutorials

Properties

float

adjustment_brightness

1.0

Texture

adjustment_color_correction

float

adjustment_contrast

1.0

bool

adjustment_enabled

false

float

adjustment_saturation

1.0

Color

ambient_light_color

Color( 0, 0, 0, 1 )

float

ambient_light_energy

1.0

float

ambient_light_sky_contribution

1.0

bool

auto_exposure_enabled

false

float

auto_exposure_max_luma

8.0

float

auto_exposure_min_luma

0.05

float

auto_exposure_scale

0.4

float

auto_exposure_speed

0.5

int

background_camera_feed_id

1

int

background_canvas_max_layer

0

Color

background_color

Color( 0, 0, 0, 1 )

float

background_energy

1.0

BGMode

background_mode

0

Sky

background_sky

float

background_sky_custom_fov

0.0

Basis

background_sky_orientation

Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )

Vector3

background_sky_rotation

Vector3( 0, 0, 0 )

Vector3

background_sky_rotation_degrees

Vector3( 0, 0, 0 )

float

dof_blur_far_amount

0.1

float

dof_blur_far_distance

10.0

bool

dof_blur_far_enabled

false

DOFBlurQuality

dof_blur_far_quality

1

float

dof_blur_far_transition

5.0

float

dof_blur_near_amount

0.1

float

dof_blur_near_distance

2.0

bool

dof_blur_near_enabled

false

DOFBlurQuality

dof_blur_near_quality

1

float

dof_blur_near_transition

1.0

Color

fog_color

Color( 0.5, 0.6, 0.7, 1 )

float

fog_depth_begin

10.0

float

fog_depth_curve

1.0

bool

fog_depth_enabled

true

float

fog_depth_end

100.0

bool

fog_enabled

false

float

fog_height_curve

1.0

bool

fog_height_enabled

false

float

fog_height_max

0.0

float

fog_height_min

10.0

float

fog_sun_amount

0.0

Color

fog_sun_color

Color( 1, 0.9, 0.7, 1 )

float

fog_transmit_curve

1.0

bool

fog_transmit_enabled

false

bool

glow_bicubic_upscale

false

GlowBlendMode

glow_blend_mode

2

float

glow_bloom

0.0

bool

glow_enabled

false

float

glow_hdr_luminance_cap

12.0

float

glow_hdr_scale

2.0

float

glow_hdr_threshold

1.0

bool

glow_high_quality

false

float

glow_intensity

0.8

bool

glow_levels/1

false

bool

glow_levels/2

false

bool

glow_levels/3

true

bool

glow_levels/4

false

bool

glow_levels/5

true

bool

glow_levels/6

false

bool

glow_levels/7

false

float

glow_strength

1.0

float

ss_reflections_depth_tolerance

0.2

bool

ss_reflections_enabled

false

float

ss_reflections_fade_in

0.15

float

ss_reflections_fade_out

2.0

int

ss_reflections_max_steps

64

bool

ss_reflections_roughness

true

float

ssao_ao_channel_affect

0.0

float

ssao_bias

0.01

SSAOBlur

ssao_blur

3

Color

ssao_color

Color( 0, 0, 0, 1 )

float

ssao_edge_sharpness

4.0

bool

ssao_enabled

false

float

ssao_intensity

1.0

float

ssao_intensity2

1.0

float

ssao_light_affect

0.0

SSAOQuality

ssao_quality

1

float

ssao_radius

1.0

float

ssao_radius2

0.0

float

tonemap_exposure

1.0

ToneMapper

tonemap_mode

0

float

tonemap_white

1.0

Methods

bool

is_glow_level_enabled ( int idx ) const

void

set_glow_level ( int idx, bool enabled )


Enumerations

enum BGMode:

BGMode BG_KEEP = 5

Keeps on screen every pixel drawn in the background. Only select this mode if you really need to keep the old data. On modern GPUs it will generally not be faster than clearing the background, and can be significantly slower, particularly on mobile.

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.

BGMode BG_CLEAR_COLOR = 0

Clears the background using the clear color defined in ProjectSettings.rendering/environment/default_clear_color.

BGMode BG_COLOR = 1

Clears the background using a custom clear color.

BGMode BG_SKY = 2

Displays a user-defined sky in the background.

BGMode BG_COLOR_SKY = 3

Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than BG_SKY and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera).

BGMode BG_CANVAS = 4

Displays a CanvasLayer in the background.

BGMode BG_CAMERA_FEED = 6

Displays a camera feed in the background.

BGMode BG_MAX = 7

Represents the size of the BGMode enum.


enum GlowBlendMode:

GlowBlendMode GLOW_BLEND_MODE_ADDITIVE = 0

Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.

GlowBlendMode GLOW_BLEND_MODE_SCREEN = 1

Screen glow blending mode. Increases brightness, used frequently with bloom.

GlowBlendMode GLOW_BLEND_MODE_SOFTLIGHT = 2

Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).

GlowBlendMode GLOW_BLEND_MODE_REPLACE = 3

Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.


enum ToneMapper:

ToneMapper TONE_MAPPER_LINEAR = 0

Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors.

ToneMapper TONE_MAPPER_REINHARDT = 1

Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color). This avoids clipping bright highlights, but the resulting image can look a bit dull.

ToneMapper TONE_MAPPER_FILMIC = 2

Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than TONE_MAPPER_REINHARDT.

ToneMapper TONE_MAPPER_ACES = 3

Use the legacy Godot version of the Academy Color Encoding System tonemapper. Unlike TONE_MAPPER_ACES_FITTED, this version of ACES does not handle bright lighting in a physically accurate way. ACES typically has a more contrasted output compared to TONE_MAPPER_REINHARDT and TONE_MAPPER_FILMIC.

Note: This tonemapping operator will be removed in Godot 4.0 in favor of the more accurate TONE_MAPPER_ACES_FITTED.

ToneMapper TONE_MAPPER_ACES_FITTED = 4

Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to TONE_MAPPER_REINHARDT and TONE_MAPPER_FILMIC.


enum DOFBlurQuality:

DOFBlurQuality DOF_BLUR_QUALITY_LOW = 0

Low depth-of-field blur quality (fastest).

DOFBlurQuality DOF_BLUR_QUALITY_MEDIUM = 1

Medium depth-of-field blur quality.

DOFBlurQuality DOF_BLUR_QUALITY_HIGH = 2

High depth-of-field blur quality (slowest).


enum SSAOBlur:

SSAOBlur SSAO_BLUR_DISABLED = 0

No blur for the screen-space ambient occlusion effect (fastest).

SSAOBlur SSAO_BLUR_1x1 = 1

1×1 blur for the screen-space ambient occlusion effect.

SSAOBlur SSAO_BLUR_2x2 = 2

2×2 blur for the screen-space ambient occlusion effect.

SSAOBlur SSAO_BLUR_3x3 = 3

3×3 blur for the screen-space ambient occlusion effect (slowest).


enum SSAOQuality:

SSAOQuality SSAO_QUALITY_LOW = 0

Low quality for the screen-space ambient occlusion effect (fastest).

SSAOQuality SSAO_QUALITY_MEDIUM = 1

Medium quality for the screen-space ambient occlusion effect.

SSAOQuality SSAO_QUALITY_HIGH = 2

High quality for the screen-space ambient occlusion effect (slowest).


Property Descriptions

float adjustment_brightness = 1.0

  • void set_adjustment_brightness ( float value )

  • float get_adjustment_brightness ( )

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


Texture adjustment_color_correction

  • void set_adjustment_color_correction ( Texture value )

  • Texture get_adjustment_color_correction ( )

Applies the provided Texture resource to affect the global color aspect of the rendered scene. Effective only if adjustment_enabled is true.


float adjustment_contrast = 1.0

  • void set_adjustment_contrast ( float value )

  • float get_adjustment_contrast ( )

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


bool adjustment_enabled = false

  • void set_adjustment_enable ( bool value )

  • bool is_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.


float adjustment_saturation = 1.0

  • void set_adjustment_saturation ( float value )

  • float get_adjustment_saturation ( )

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


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

  • void set_ambient_light_color ( Color value )

  • Color get_ambient_light_color ( )

The ambient light's Color.


float ambient_light_energy = 1.0

  • void set_ambient_light_energy ( float value )

  • float get_ambient_light_energy ( )

The ambient light's energy. The higher the value, the stronger the light.


float ambient_light_sky_contribution = 1.0

  • void set_ambient_light_sky_contribution ( float value )

  • float get_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).


bool auto_exposure_enabled = false

  • void set_tonemap_auto_exposure ( bool value )

  • bool get_tonemap_auto_exposure ( )

If true, enables the tonemapping auto exposure mode of the scene renderer. If true, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.


float auto_exposure_max_luma = 8.0

  • void set_tonemap_auto_exposure_max ( float value )

  • float get_tonemap_auto_exposure_max ( )

The maximum luminance value for the auto exposure.


float auto_exposure_min_luma = 0.05

  • void set_tonemap_auto_exposure_min ( float value )

  • float get_tonemap_auto_exposure_min ( )

The minimum luminance value for the auto exposure.


float auto_exposure_scale = 0.4

  • void set_tonemap_auto_exposure_grey ( float value )

  • float get_tonemap_auto_exposure_grey ( )

The scale of the auto exposure effect. Affects the intensity of auto exposure.


float auto_exposure_speed = 0.5

  • void set_tonemap_auto_exposure_speed ( float value )

  • float get_tonemap_auto_exposure_speed ( )

The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.


int background_camera_feed_id = 1

  • void set_camera_feed_id ( int value )

  • int get_camera_feed_id ( )

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


int background_canvas_max_layer = 0

  • void set_canvas_max_layer ( int value )

  • int get_canvas_max_layer ( )

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


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

  • void set_bg_color ( Color value )

  • Color get_bg_color ( )

The Color displayed for clear areas of the scene. Only effective when using the BG_COLOR or BG_COLOR_SKY background modes).


float background_energy = 1.0

  • void set_bg_energy ( float value )

  • float get_bg_energy ( )

The power of the light emitted by the background. This affects the sky brightness, the ambient light (if ambient_light_sky_contribution is greater than 0.0) and specular light from the sky.


BGMode background_mode = 0

  • void set_background ( BGMode value )

  • BGMode get_background ( )

The background mode. See BGMode for possible values.


Sky background_sky

  • void set_sky ( Sky value )

  • Sky get_sky ( )

The Sky resource defined as background.


float background_sky_custom_fov = 0.0

  • void set_sky_custom_fov ( float value )

  • float get_sky_custom_fov ( )

The Sky resource's custom field of view.


Basis background_sky_orientation = Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )

  • void set_sky_orientation ( Basis value )

  • Basis get_sky_orientation ( )

The Sky resource's rotation expressed as a Basis.


Vector3 background_sky_rotation = Vector3( 0, 0, 0 )

  • void set_sky_rotation ( Vector3 value )

  • Vector3 get_sky_rotation ( )

The Sky resource's rotation expressed as Euler angles in radians.


Vector3 background_sky_rotation_degrees = Vector3( 0, 0, 0 )

  • void set_sky_rotation_degrees ( Vector3 value )

  • Vector3 get_sky_rotation_degrees ( )

The Sky resource's rotation expressed as Euler angles in degrees.


float dof_blur_far_amount = 0.1

  • void set_dof_blur_far_amount ( float value )

  • float get_dof_blur_far_amount ( )

The amount of far blur for the depth-of-field effect.


float dof_blur_far_distance = 10.0

  • void set_dof_blur_far_distance ( float value )

  • float get_dof_blur_far_distance ( )

The distance from the camera where the far blur effect affects the rendering.


bool dof_blur_far_enabled = false

  • void set_dof_blur_far_enabled ( bool value )

  • bool is_dof_blur_far_enabled ( )

If true, enables the depth-of-field far blur effect.


DOFBlurQuality dof_blur_far_quality = 1

The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower.


float dof_blur_far_transition = 5.0

  • void set_dof_blur_far_transition ( float value )

  • float get_dof_blur_far_transition ( )

The length of the transition between the no-blur area and far blur.


float dof_blur_near_amount = 0.1

  • void set_dof_blur_near_amount ( float value )

  • float get_dof_blur_near_amount ( )

The amount of near blur for the depth-of-field effect.


float dof_blur_near_distance = 2.0

  • void set_dof_blur_near_distance ( float value )

  • float get_dof_blur_near_distance ( )

Distance from the camera where the near blur effect affects the rendering.


bool dof_blur_near_enabled = false

  • void set_dof_blur_near_enabled ( bool value )

  • bool is_dof_blur_near_enabled ( )

If true, enables the depth-of-field near blur effect.


DOFBlurQuality dof_blur_near_quality = 1

The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower.


float dof_blur_near_transition = 1.0

  • void set_dof_blur_near_transition ( float value )

  • float get_dof_blur_near_transition ( )

The length of the transition between the near blur and no-blur area.


Color fog_color = Color( 0.5, 0.6, 0.7, 1 )

  • void set_fog_color ( Color value )

  • Color get_fog_color ( )

The fog's Color.


float fog_depth_begin = 10.0

  • void set_fog_depth_begin ( float value )

  • float get_fog_depth_begin ( )

The fog's depth starting distance from the camera.


float fog_depth_curve = 1.0

  • void set_fog_depth_curve ( float value )

  • float get_fog_depth_curve ( )

The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve.


bool fog_depth_enabled = true

  • void set_fog_depth_enabled ( bool value )

  • bool is_fog_depth_enabled ( )

If true, the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera).


float fog_depth_end = 100.0

  • void set_fog_depth_end ( float value )

  • float get_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 Camera.far value.


bool fog_enabled = false

  • void set_fog_enabled ( bool value )

  • bool is_fog_enabled ( )

If true, fog effects are enabled. fog_height_enabled and/or fog_depth_enabled must be set to true to actually display fog.


float fog_height_curve = 1.0

  • void set_fog_height_curve ( float value )

  • float get_fog_height_curve ( )

The height fog's intensity. A number of presets are available in the Inspector by right-clicking the curve.


bool fog_height_enabled = false

  • void set_fog_height_enabled ( bool value )

  • bool is_fog_height_enabled ( )

If true, the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader.


float fog_height_max = 0.0

  • void set_fog_height_max ( float value )

  • float get_fog_height_max ( )

The Y coordinate where the height fog will be the most intense. If this value is greater than fog_height_min, fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom.


float fog_height_min = 10.0

  • void set_fog_height_min ( float value )

  • float get_fog_height_min ( )

The Y coordinate where the height fog will be the least intense. If this value is greater than fog_height_max, fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top.


float fog_sun_amount = 0.0

  • void set_fog_sun_amount ( float value )

  • float get_fog_sun_amount ( )

The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene.


Color fog_sun_color = Color( 1, 0.9, 0.7, 1 )

  • void set_fog_sun_color ( Color value )

  • Color get_fog_sun_color ( )

The depth fog's Color when looking towards the sun.


float fog_transmit_curve = 1.0

  • void set_fog_transmit_curve ( float value )

  • float get_fog_transmit_curve ( )

The intensity of the fog light transmittance effect. Amount of light that the fog transmits.


bool fog_transmit_enabled = false

  • void set_fog_transmit_enabled ( bool value )

  • bool is_fog_transmit_enabled ( )

Enables fog's light transmission effect. If true, light will be more visible in the fog to simulate light scattering as in real life.


bool glow_bicubic_upscale = false

  • void set_glow_bicubic_upscale ( bool value )

  • bool is_glow_bicubic_upscale_enabled ( )

Smooths out the blockiness created by sampling higher levels, at the cost of performance.

Note: When using the GLES2 renderer, this is only available if the GPU supports the GL_EXT_gpu_shader4 extension.


GlowBlendMode glow_blend_mode = 2

The glow blending mode.


float glow_bloom = 0.0

  • void set_glow_bloom ( float value )

  • float get_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.


bool glow_enabled = false

  • void set_glow_enabled ( bool value )

  • bool is_glow_enabled ( )

If true, the glow effect is enabled.

Note: Only effective if ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation is 3D (not 3D Without Effects). On mobile, ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation defaults to 3D Without Effects by default, so its .mobile override needs to be changed to 3D.

Note: When using GLES3 on mobile, HDR rendering is disabled by default for performance reasons. This means glow will only be visible if glow_hdr_threshold is decreased below 1.0 or if glow_bloom is increased above 0.0. Also consider increasing glow_intensity to 1.5. If you want glow to behave on mobile like it does on desktop (at a performance cost), enable ProjectSettings.rendering/quality/depth/hdr's .mobile override.


float glow_hdr_luminance_cap = 12.0

  • void set_glow_hdr_luminance_cap ( float value )

  • float get_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.


float glow_hdr_scale = 2.0

  • void set_glow_hdr_bleed_scale ( float value )

  • float get_glow_hdr_bleed_scale ( )

The bleed scale of the HDR glow.


float glow_hdr_threshold = 1.0

  • void set_glow_hdr_bleed_threshold ( float value )

  • float get_glow_hdr_bleed_threshold ( )

The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below 1.0 for glow to be visible. A value of 0.9 works well in this case.


bool glow_high_quality = false

  • void set_glow_high_quality ( bool value )

  • bool is_glow_high_quality_enabled ( )

Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long.


float glow_intensity = 0.8

  • void set_glow_intensity ( float value )

  • float get_glow_intensity ( )

The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.


bool glow_levels/1 = false

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 1st level of glow is enabled. This is the most "local" level (least blurry).


bool glow_levels/2 = false

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 2th level of glow is enabled.


bool glow_levels/3 = true

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 3th level of glow is enabled.


bool glow_levels/4 = false

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 4th level of glow is enabled.


bool glow_levels/5 = true

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 5th level of glow is enabled.


bool glow_levels/6 = false

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 6th level of glow is enabled.


bool glow_levels/7 = false

  • void set_glow_level ( int idx, bool enabled )

  • bool is_glow_level_enabled ( int idx ) const

If true, the 7th level of glow is enabled. This is the most "global" level (blurriest).


float glow_strength = 1.0

  • void set_glow_strength ( float value )

  • float get_glow_strength ( )

The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.


float ss_reflections_depth_tolerance = 0.2

  • void set_ssr_depth_tolerance ( float value )

  • float get_ssr_depth_tolerance ( )

The depth tolerance for screen-space reflections.


bool ss_reflections_enabled = false

  • void set_ssr_enabled ( bool value )

  • bool is_ssr_enabled ( )

If true, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from GIProbes or ReflectionProbes, but are slower and can't reflect surfaces occluded by others.


float ss_reflections_fade_in = 0.15

  • void set_ssr_fade_in ( float value )

  • float get_ssr_fade_in ( )

The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection).


float ss_reflections_fade_out = 2.0

  • void set_ssr_fade_out ( float value )

  • float get_ssr_fade_out ( )

The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection.


int ss_reflections_max_steps = 64

  • void set_ssr_max_steps ( int value )

  • int get_ssr_max_steps ( )

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


bool ss_reflections_roughness = true

  • void set_ssr_rough ( bool value )

  • bool is_ssr_rough ( )

If true, screen-space reflections will take the material roughness into account.


float ssao_ao_channel_affect = 0.0

  • void set_ssao_ao_channel_affect ( float value )

  • float get_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.


float ssao_bias = 0.01

  • void set_ssao_bias ( float value )

  • float get_ssao_bias ( )

The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion.


SSAOBlur ssao_blur = 3

The screen-space ambient occlusion blur quality. See SSAOBlur for possible values.


Color ssao_color = Color( 0, 0, 0, 1 )

  • void set_ssao_color ( Color value )

  • Color get_ssao_color ( )

The screen-space ambient occlusion color.


float ssao_edge_sharpness = 4.0

  • void set_ssao_edge_sharpness ( float value )

  • float get_ssao_edge_sharpness ( )

The screen-space ambient occlusion edge sharpness.


bool ssao_enabled = false

  • void set_ssao_enabled ( bool value )

  • bool is_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. This is a costly effect and should be disabled first when running into performance issues.


float ssao_intensity = 1.0

  • void set_ssao_intensity ( float value )

  • float get_ssao_intensity ( )

The primary screen-space ambient occlusion intensity. See also ssao_radius.


float ssao_intensity2 = 1.0

  • void set_ssao_intensity2 ( float value )

  • float get_ssao_intensity2 ( )

The secondary screen-space ambient occlusion intensity. See also ssao_radius2.


float ssao_light_affect = 0.0

  • void set_ssao_direct_light_affect ( float value )

  • float get_ssao_direct_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.


SSAOQuality ssao_quality = 1

The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower.


float ssao_radius = 1.0

  • void set_ssao_radius ( float value )

  • float get_ssao_radius ( )

The primary screen-space ambient occlusion radius.


float ssao_radius2 = 0.0

  • void set_ssao_radius2 ( float value )

  • float get_ssao_radius2 ( )

The secondary screen-space ambient occlusion radius. If set to a value higher than 0, enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance).


float tonemap_exposure = 1.0

  • void set_tonemap_exposure ( float value )

  • float get_tonemap_exposure ( )

The default exposure used for tonemapping.


ToneMapper tonemap_mode = 0

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


float tonemap_white = 1.0

  • void set_tonemap_white ( float value )

  • float get_tonemap_white ( )

The white reference value for tonemapping. Only effective if the tonemap_mode isn't set to TONE_MAPPER_LINEAR.


Method Descriptions

bool is_glow_level_enabled ( int idx ) const

Returns true if the glow level idx is specified, false otherwise.


void set_glow_level ( int idx, bool enabled )

Enables or disables the glow level at index idx. 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.