Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Environment

Inherits: Resource < RefCounted < 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

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

AmbientSource

ambient_light_source

0

int

background_camera_feed_id

1

int

background_canvas_max_layer

0

Color

background_color

Color(0, 0, 0, 1)

float

background_energy_multiplier

1.0

float

background_intensity

30000.0

BGMode

background_mode

0

float

fog_aerial_perspective

0.0

float

fog_density

0.01

bool

fog_enabled

false

float

fog_height

0.0

float

fog_height_density

0.0

Color

fog_light_color

Color(0.518, 0.553, 0.608, 1)

float

fog_light_energy

1.0

float

fog_sky_affect

1.0

float

fog_sun_scatter

0.0

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

float

glow_intensity

0.8

float

glow_levels/1

0.0

float

glow_levels/2

0.0

float

glow_levels/3

1.0

float

glow_levels/4

0.0

float

glow_levels/5

1.0

float

glow_levels/6

0.0

float

glow_levels/7

0.0

Texture

glow_map

float

glow_map_strength

0.8

float

glow_mix

0.05

bool

glow_normalized

false

float

glow_strength

1.0

ReflectionSource

reflected_light_source

0

float

sdfgi_bounce_feedback

0.5

float

sdfgi_cascade0_distance

12.8

int

sdfgi_cascades

4

bool

sdfgi_enabled

false

float

sdfgi_energy

1.0

float

sdfgi_max_distance

204.8

float

sdfgi_min_cell_size

0.2

float

sdfgi_normal_bias

1.1

float

sdfgi_probe_bias

1.1

bool

sdfgi_read_sky_light

true

bool

sdfgi_use_occlusion

false

SDFGIYScale

sdfgi_y_scale

1

Sky

sky

float

sky_custom_fov

0.0

Vector3

sky_rotation

Vector3(0, 0, 0)

float

ssao_ao_channel_affect

0.0

float

ssao_detail

0.5

bool

ssao_enabled

false

float

ssao_horizon

0.06

float

ssao_intensity

2.0

float

ssao_light_affect

0.0

float

ssao_power

1.5

float

ssao_radius

1.0

float

ssao_sharpness

0.98

bool

ssil_enabled

false

float

ssil_intensity

1.0

float

ssil_normal_rejection

1.0

float

ssil_radius

5.0

float

ssil_sharpness

0.98

float

ssr_depth_tolerance

0.2

bool

ssr_enabled

false

float

ssr_fade_in

0.15

float

ssr_fade_out

2.0

int

ssr_max_steps

64

float

tonemap_exposure

1.0

ToneMapper

tonemap_mode

0

float

tonemap_white

1.0

Color

volumetric_fog_albedo

Color(1, 1, 1, 1)

float

volumetric_fog_ambient_inject

0.0

float

volumetric_fog_anisotropy

0.2

float

volumetric_fog_density

0.05

float

volumetric_fog_detail_spread

2.0

Color

volumetric_fog_emission

Color(0, 0, 0, 1)

float

volumetric_fog_emission_energy

1.0

bool

volumetric_fog_enabled

false

float

volumetric_fog_gi_inject

1.0

float

volumetric_fog_length

64.0

float

volumetric_fog_sky_affect

1.0

float

volumetric_fog_temporal_reprojection_amount

0.9

bool

volumetric_fog_temporal_reprojection_enabled

true

Methods

float

get_glow_level ( int idx ) const

void

set_glow_level ( int idx, float intensity )


Enumerations

enum BGMode:

BGMode BG_CLEAR_COLOR = 0

Clears the background using the clear color defined in ProjectSettings.rendering/environment/defaults/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_CANVAS = 3

Displays a CanvasLayer in the background.

BGMode BG_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.

BGMode BG_CAMERA_FEED = 5

Displays a camera feed in the background.