Up to date

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

Environment and post-processing

Godot 4 provides a redesigned Environment resource, as well as a new post-processing system with many available effects right out of the box.

Note

As of Godot 4, Environment performance/quality settings are defined in the project settings instead of in the Environment resource. This makes global adjustments easier, as you no longer have to tweak Environment resources individually to suit various hardware configurations.

Note that most Environment performance/quality settings are only visible after enabling the Advanced toggle in the Project Settings.

Environment

The Environment resource stores all the information required for controlling the 2D and 3D rendering environment. This includes the sky, ambient lighting, tone mapping, effects, and adjustments. By itself, it does nothing, but you can enable it by using it in one of the following locations, in order of priority:

Camera3D node (high priority)

An Environment can be set to a Camera3D node. It will have priority over any other setting.

../../_images/environment_camera.webp

This is mostly useful when you want to override an existing environment, but in general it's a better idea to use the option below.

Preview environment and sun (low priority)

Note

Since Godot 4, the preview environment and sun system replace the default_env.tres file that was used in Godot 3 projects.

If no WorldEnvironment node or DirectionalLight3D node is present in the current scene, the editor will display a preview environment and sun instead. This can be disabled using the buttons at the top of the 3D editor:

../../_images/environment_preview_sun_sky_toggle.webp

Clicking on the 3 vertical dots on the right will display a dialog which allows you to customize the appearance of the preview environment:

../../_images/environment_preview_sun_sky_toggle.webp

The preview sun and sky is only visible in the editor, not in the running project. Using the buttons at the bottom of the dialog, you can add the preview sun and sky into the scene as nodes.

Tip

If you hold Shift while clicking Add Sun to Scene or Add Environment to Scene in the preview environment editor, this will add both a preview sun and environment to the current scene (as if you clicked both buttons separately). Use this to speed up project setup and prototyping.

Camera attributes

Note

In Godot 4, exposure and depth of field information was split from the Environment resource into a separate CameraAttributes resource. This allows adjusting those properties independently of other Environment settings more easily.

The CameraAttributes resource stores exposure and depth of field information. It also allows enabling automatic exposure adjustments depending on scene brightness.

There are two kinds of CameraAttribute resources available:

  • CameraAttributesPractical: Features are exposed using arbitrary units, which are easier to reason about for most game use cases.

  • CameraAttributesPhysical: Features are exposed using real world units, similar to a digital camera. For example, field of view is set using a focal length in millimeters instead of a value in degrees. Recommended when physical accuracy is important, such as for photorealistic rendering.

Both CameraAttribute resource types allow you to use the same features, but they are configured differently. If you don't know which one to choose, use CameraAttributesPractical.

Note

Using a CameraAttributesPhysical on a Camera3D node will lock o