Commit Graph

63 Commits

Author SHA1 Message Date
92f3173794 Disable texture array reflections on Intel GPUs on macOS due to driver bugs
The check is only present in x86 builds, since Apple Silicon never
uses an Intel GPU by definition.
2025-02-26 02:28:36 +01:00
96ce5c0001 Ensure Sky with custom fov has correction matrix applied to it in RD renderers 2025-01-03 17:11:02 -08:00
5f617663aa fix: separate sky luminance and user brightness calculations around fog 2024-12-20 11:25:11 +11:00
d9ef826c54 Optimize RenderForwardClustered::_setup_render_pass_uniform_set by reducing Vector allocations during push_back operations 2024-12-02 15:03:50 +01:00
6d5ac8f7ef Resolve load and store ops automatically for render passes for discardable textures. 2024-11-25 11:27:48 -03:00
02efdb28dc Unify y-flip behavior for sky in RD backends 2024-11-19 16:59:04 -08:00
0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
82d7531a2e Merge pull request #95990 from Breush/76166-sky-auto-radiance
Sky: Adapt radiance size if `AUTOMATIC_MODE` resolves to `REALTIME`
2024-09-04 17:12:02 +02:00
44e526d3d5 Sky: No more auto-selecting REALTIME mode if radiance is not 256 2024-09-04 10:54:08 +02:00
09e59fbec5 Fix SkyRD::Sky::free() freeing material 2024-09-02 18:59:31 +02:00
364f916f3f Add debug utilities for Vulkan
Features:
- Debug-only tracking of objects by type. See
get_driver_allocs_by_object_type et al.
 - Debug-only Breadcrumb info for debugging GPU crashes and device lost
 - Performance report per frame from get_perf_report
- Some VMA calls had to be modified in order to insert the necessary
memory callbacks

Functionality marked as "debug-only" is only available in debug or dev
builds.

Misc fixes:
 - Early break optimization in RenderingDevice::uniform_set_create

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.
2024-08-21 23:48:08 +02:00
eb62c5b27f Revert change to default depth clear value in draw_list_begin 2024-04-17 19:08:22 -07:00
d950f5f838 Use Reverse Z for the depth buffer 2024-04-04 13:54:15 +02:00
cc4d39b0c1 Acyclic Command Graph for RenderingDevice.
Adds a new system to automatically reorder commands, perform layout transitions and insert synchronization barriers based on the commands issued to RenderingDevice.
2024-01-08 14:54:56 -03:00
fdd3d36c6d [Servers] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-25 18:45:30 +02:00
057367bf4f Add FidelityFX Super Resolution 2.2 (FSR 2.2.1) support.
Introduces support for FSR2 as a new upscaler option available from the project settings. Also introduces an specific render list for surfaces that require motion and the ability to derive motion vectors from depth buffer and camera motion.
2023-09-25 10:37:47 -03:00
9b91750fb1 Fix mipmap bias behavior by refactoring how samplers are created by Material Storage.
Introduces a new structure to store samplers created with certain parameters instead of storing a 'custom' set of samplers. Allows viewports to correctly configure the mipmap bias and use it when rendering the scene.
2023-09-06 11:24:19 -03:00
1163dac9e3 Merge pull request #80215 from clayjohn/HDR-2D
Add option to enable HDR rendering in 2D
2023-08-08 16:57:33 +02:00
57eb762bae Add option to enable HDR rendering in 2D
This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance

Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear.
This is necessary for proper HDR screen support in the future.
2023-08-07 11:24:03 +02:00
79c9edab3b Draw sky as a fullscreen triangle 2023-08-05 17:55:43 -03:00
67c13fe4eb Use defaults to initialize sky data in case of no sky 2023-07-24 10:41:13 -07:00
bb15241e06 Merge pull request #77740 from ChibiDenDen/simplify_vulkan
Replace sampler arrays with constant sampler elements, simplify and reuse code for all shaders
2023-07-12 17:16:12 +02:00
35715e510f replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +03:00
66272ea26e Fix volumetric fog in stereo by projection vertex in combined space 2023-06-20 14:36:14 +10:00
347a8e20ae Merge pull request #69324 from RedMser/advanced-settings-errors
Make it easier to solve warnings/errors referring to project settings
2023-04-11 19:39:53 +02:00
901cd7e3fe Fix framebuffers in sky not being created on mobile renderer 2023-04-05 09:43:03 +10:00
ed960453b7 Make solving project setting errors easier
Show full project setting path in error messages.
Force filtering for advanced settings if filter is not empty.
2023-03-27 08:10:35 +02:00
a8ec72cf94 Move roughness limiter and sort into their own classes 2023-03-09 21:58:55 +11:00
94831c7209 Forbid passing multiview sampler to the custom function in shaders 2023-02-21 11:23:17 +03:00
bc64a734d3 Fix various crashes relating to low roughness_layers 2023-01-30 12:16:33 -08:00
5f94b378ab Validate another case of using DATA_FORMAT_A2B10G10R10_UNORM_PACK32 texture with storage flag 2023-01-25 11:31:53 -08:00
5931d504c1 Add a few more checks to ensure that unsupported image formats are not used in the mobile renderer 2023-01-23 12:38:09 -08:00
8b3db6e9ce Properly initialize directional_light_count in RD sky shaders 2023-01-16 13:05:52 -08: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
e886a7af81 Cleanup and improve sky render 2022-12-23 19:45:19 +11:00
1b330820bf Implement render_target_was_used API so that Viewports can properly check if they have been used.
For the RD renderer, this does not work for Viewports used in scene shaders yet
2022-12-16 09:50:45 -08:00
56954485ed Refactor ShaderData & fix the sorting of shader uniforms 2022-12-15 10:02:59 +03:00
0f8a968cd4 Modified the mobile renderer to apply the sky_transform operations in the same order as the forward_plus renderer.
Update rasterizer_scene_gles3.cpp

Apply sky_transform order fix to the gles3 renderer.
2022-12-06 06:47:50 -05:00
f7c611ab71 Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
072f6feaba Make some Image methods static 2022-10-14 14:34:15 +02:00
ecd4ab1e14 Merge pull request #66683 from clayjohn/SRGB-canvasitem
Default CanvasItem materials to use sRGB space for uniform colors
2022-10-05 11:44:52 +02:00
2cea42cc7f Rename Projection matrix to columns 2022-10-04 12:34:19 -05:00
ddc4ae1175 Move cluster builder, sdfgi and gi structures to clustered renderer, move light and probe elements into storage and reorganise our render_scene method. 2022-10-04 11:03:32 +11:00
06d0e56559 Default CanvasItem materials to not convert uniform colors to linear space.
The 2D renderer in Godot is totally in sRGB space so it is appropriate
to keep 2D uniform colors in sRGB space
2022-09-30 15:15:11 -07:00
72d899702b Clear last frame directional light buffer when number of lights changes.
This ensures that the buffers don't go out of sync.
2022-09-14 08:30:35 -07:00
8fa76a5272 Move debanding into internal sky shader code so that it is applied after everything else.
This ensures that the debanding does not scale with exposure or any other effect.
2022-09-13 10:39:04 -07:00
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +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
2cd84be64d Extracting render buffers and changing it to a more generic solution 2022-09-01 20:01:45 +10:00