Commit Graph

187 Commits

Author SHA1 Message Date
85e47d6fac Merge pull request #109447 from jon1solution/ssao-in-gles3
Implement a very simple SSAO in GLES3.
2025-11-01 19:04:57 +01:00
2e59cb41f4 Optimize glow and tonemap gather step in the mobile renderer
Mobile devices are typically bandwidth bound which means we need to do as few texture samples as possible.

They typically use TBDR GPUs which means that all rendering takes place on special optimized tiles. As a side effect, reading back memory from tile to VRAM is really slow, especially on Mali devices.

This commit uses a technique where you do a small blur while downsampling, and then another small blur while upsampling to get really high quality glow. While this doesn't reduce the renderpass count very much, it does reduce the texture read bandwidth by almost 10 times. Overall glow was more texture-read bound than memory write, bound, so this was a huge win.

A side effect of this new technique is that we can gather the glow as we upsample instead of gathering the glow in the final tonemap pass. Doing so allows us to significantly reduce the cost of the tonemap pass as well.
2025-10-30 21:56:26 -07:00
31ee691fbf Implemented a very simple SSAO in GLES3. 2025-10-27 06:02:04 -07:00
da593d0c16 Merge pull request #111897 from allenwp/environment-adj-prioritize-old-behaviour
Improve `Environment` adjustments (favor old behavior and quality).
2025-10-23 11:03:56 -05:00
0c7f013c55 Improve Environment color adjustments; specifically brightness and HDR 2D contrast.
This commit changes adjustments to behave as follows for all rendering configurations:

- Apply brightness to linear-encoded values, preventing contrast, saturation, and hue from being affected.
- Apply contrast to perceptually uniform (nonlinear sRGB-encoded) values, matching existing behavior when HDR 2D is disabled and producing optimal visual quality.
- Apply saturation with even color channel weights. This causes brightness of certain colors to change, but matches existing behavior when HDR 2D is disabled.

Adjustments are applied after glow and tonemapping to match existing behavior.
2025-10-23 11:08:49 -04:00
c128886c63 Overhaul screen space reflections. 2025-10-21 19:23:38 +03:00
cafc012b05 Blend Environment glow before tonemapping and change default blend mode to screen.
Additionally, change the minimum `tonemap_white` parameter to `1.0`; users can increase `tonemap_exposure` for a similar effect to decreasing `tonemap_white` below `1.0`.

Co-authored-by: Hei <40064911+Lielay9@users.noreply.github.com>
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-10-10 12:08:08 -04:00
38af23a654 Merge pull request #89409 from aaronfranke/server-folders
Move server files into their subfolders
2025-10-03 12:01:00 -05:00
1c4760878b Merge pull request #110843 from allenwp/fix-glow-intensity-editor-compatibility
Fix glow intensity not showing in compatibility renderer
2025-10-01 17:54:15 -05:00
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
9fbf5808a0 Rename server "free" functions to "free_rid" to match exposed API 2025-09-30 16:52:25 -07:00
3101d75634 Fix glow intensity not showing in compatibility renderer when blend mode is set to mix. 2025-09-23 17:45:35 -04:00
a7ab249a2a Make PROPERTY_HINT_GROUP_ENABLE hide properties by default 2025-06-16 20:03:49 +08:00
8ba4656ea3 Compile out editor-only logic within validate_property in games 2025-06-12 12:54:19 +08:00
1a427d3dec Add feature hint string and "On" text for checkable groups 2025-05-21 14:56:55 -07:00
f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
ebe9370724 Add enable checkboxes to editor sections
Fixes https://github.com/godotengine/godot-proposals/issues/4173
2025-04-15 13:49:41 -07:00
084e84be78 Add AgX tonemapper option to Environment
Technical implementation notes:

- Moved linearization step to before the outset matrix is applied and
  changed polynomial contrast curve approximation.
  - This does *not* implement Blender's chroma rotation to address hue shift.
    This hue rotation was found to have a significant performance impact.
- Improved performance by combining the AgX outset matrix with the Rec 2020 matrix.

Co-authored-by: Allen Pestaluky <allenpestaluky@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2025-01-08 17:01:16 +01:00
6f846eb5c5 Added external camera feed from external plugin on Android 2024-10-30 18:30:28 +01:00
aa260e5f3d Implement glow/bloom on compatibility renderer 2024-02-19 13:29:43 +11:00
08f4560e69 Add optional depth fog 2024-02-17 22:39:34 -03:00
e45927b2f2 Replace radians range hint with radians_as_degrees 2023-09-25 08:50:19 +02:00
8041cff865 Clamp Volumetric Fog Length property to prevent rendering issues
A length of 0 units doesn't make sense anyway.
2023-08-10 15:55:36 +02:00
de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
c69b14e96e Add warnings for unsupported features in mobile and gl_compatibility backends 2023-02-26 12:28:02 -08:00
fc5fafbb32 Merge pull request #70602 from Calinou/environment-no-sky-hide-ambient-light-properties
Hide Ambient Light properties in Environment inspector depending on mode
2023-01-19 21:53:02 +01:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
58fcf5ed70 Hide Ambient Light properties in Environment inspector depending on mode 2022-12-26 21:59:51 +01:00
7f9a8c99c9 Clean up Basis from Euler code 2022-10-21 17:54:49 -05:00
f7292dbeb3 Rename or_lesser range property hint to or_less
"less" should be used for quantity, rather than "lesser".

Existing scripts that use `or_lesser` in `_get_property_list()`
will need to be updated to account for this change.
2022-09-02 19:08:20 +02:00
d63c6fc463 Merge pull request #60185 from Calinou/environment-fog-and-sky-affect 2022-09-01 23:52:34 +02:00
699e9f7966 Add Environment properties to control fog rendering on background sky
Values lower than 1.0 can be used to make the fog rendering not fully
obstruct the sky. This can be desired when using fog as a purely
atmospheric effect, without intending to use fog for open world fog
fading.

When set to 0.0, fog rendering behavior will be similar to Godot 3.x
where sky rendering was never affected by fog.
2022-09-01 19:07:39 +02:00
385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
c25b8f2876 Remove unintentional PROPERTY_USAGE_INTERNAL
The flag only matters for property definition,
but was also used in _validate_property a lot.
2022-08-18 16:25:00 +02:00
83f2723893 Fix some property validation not been refactored 2022-08-18 16:24:15 +02:00
1f6e081db7 Don't store the values of linked SDFGI properties in Environment 2022-08-04 02:24:28 +02:00
6059a9b624 Improve easing inspector usability
- Add `positive_only` property hint to disallow using negative presets.
  These values are clamped in several places in the editor already,
  so this avoids displaying presets that don't work.
- Move the Zero preset at the end of the positive list to match
  the custom property editor. It's also used less often than Linear,
  Ease In and Ease Out.
- Rename presets to be consistent between the easing property editor
  and custom property editor.
- Remove unused `inout` hint which was redundant since it was already
  the default.
2022-08-01 18:40:04 +02:00
83c1060187 Change fog density range hint to be 0 to 1 with or_greater 2022-07-21 01:26:42 -05:00
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
dbe513931f Add a property hint to Environment's sky_rotation property
This property hint is identical to Node3D's `sky_rotation` property
and provides degree-based editing.
2022-06-09 22:54:15 +02:00
12edb2ce58 Merge pull request #55909 from Calinou/volumetric-fog-tweak-temporal-reprojection-range-hint
Tweak the volumetric fog temporal reprojection property hint
2022-06-07 08:56:05 -07:00
5dc3bfb80e Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
f9c0a66d6e Hide SSIL properties when SSIL is disabled in the Environment resource
- Hide Tonemap White property when the tonemapper is Linear
  (as linear tonemapping does not use a whitepoint).
2022-04-10 23:44:19 +02:00
bb7e6e9951 Rename "ss_reflections_" to "ssr_" in Environment 2022-03-25 14:37:01 -05:00
c10e97b604 Clamp environment light sky contribution to the [0.0; 1.0] range
The value is already clamped in the editor, but it wasn't being
clamped when the value was set via code. Values outside the [0.0; 1.0]
range can result in broken rendering.
2022-02-14 17:15:32 +01:00
7721e19ccc Tweak default SDFGI settings for better quality
- Enable Read Sky Light to get proper outdoors lighting out of the box.
- Set bounce feedback to 0.5 by default to get a better quality result.
  - Higher values may cause infinite feedback with bright surfaces.
- Increase the number of frames to converge to improve quality
  at the cost of latency. Most scenes are fairly static after all.
- Use 75% Y scale by default as most scenes are not highly vertical.

- Reorder the Y scale enum to go from the lowest Y scale to the highest.
  Also rename the "Disabled" setting to "100%" for clarity.
2022-02-06 15:28:59 +01:00