Commit Graph

118 Commits

Author SHA1 Message Date
clayjohn
02efdb28dc Unify y-flip behavior for sky in RD backends 2024-11-19 16:59:04 -08:00
Thaddeus Crews
bb5f390fb9
Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Thaddeus Crews
9f908a3a5b
Merge pull request #86103 from ecmjohnson/fix-inside-volfog
Fix volumetric fog artifacts when inside the fog
2024-10-24 13:22:57 -05:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Thaddeus Crews
b37fc1014a
Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00
Rémi Verschelde
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
Alexis Breust
44e526d3d5 Sky: No more auto-selecting REALTIME mode if radiance is not 256 2024-09-04 10:54:08 +02:00
ComycSans
09e59fbec5 Fix SkyRD::Sky::free() freeing material 2024-09-02 18:59:31 +02:00
Matias N. Goldberg
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
Garteal
2606831d71 SDFGI: fix crash if update_data is nullptr 2024-07-19 18:27:32 +02:00
A Thousand Ships
308dbb8c63
[Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
clayjohn
eb62c5b27f Revert change to default depth clear value in draw_list_begin 2024-04-17 19:08:22 -07:00
Khasehemwy
d950f5f838
Use Reverse Z for the depth buffer 2024-04-04 13:54:15 +02:00
Erik Johnson
532630e7cd Fix volumetric fog artifacts when inside the fog 2024-03-24 14:15:22 -04:00
A Thousand Ships
79ba22a73f
Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
bitsawer
89d772a799
Fix Volumetric Fog VoxelGI updates 2024-03-01 14:47:15 +01:00
Bastiaan Olij
5a98845655 Implement hooks into renderer 2024-02-18 21:54:21 +11:00
Dario
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
EddieBreeg
8747c67d9e
Fix potential integer underflow in rounded up divisions
A new `Math::division_round_up()` function was added, allowing for easy
and correct computation of integer divisions when the result needs to
be rounded up.

Fixes #80358.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-01-02 14:14:47 +01:00
Rémi Verschelde
f021d33940
Merge pull request #81167 from bitsawer/fix_sdfgi_editor_change
Reset SDFGI when changing editor scene tabs
2023-10-25 10:27:03 +02:00
Rémi Verschelde
d351d40e29
Merge pull request #82877 from tomissj2/master
Fog shader: Fix undeclared identifier `global_variables`
2023-10-05 22:51:48 +02:00
Rémi Verschelde
7ee2eb5c92
Merge pull request #80992 from viksl/volumetric-fog-NaN-issues
Fix volumetric fog NaN values in textures from starting at a zero Vector2.
2023-10-05 22:48:31 +02:00
tomissj2
e906eb8433
Fog Shader bugfix: 'global_variables' : undeclared identifier
If user try to use a global shader variable in a fog type shader we are getting shader error. The reason of this there is a typo in the fog.cpp. I other well working shaders types like sky the "action.global_buffer_array_variable" is "global_shader_uniforms.data". 
The investigation tracked here:
https://discord.com/channels/212250894228652034/1158918161337434172
2023-10-05 22:12:50 +02:00
A Thousand Ships
fdd3d36c6d [Servers] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-25 18:45:30 +02:00
Dario
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
Dario
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
bitsawer
836705d7a9 Reset SDFGI when changing editor scene tabs 2023-08-30 19:50:05 +03:00
viksl
00c2fb4a08 Instead of Vector2() start volumetric fog at frustum_near_size to avoid INF and NaN in shaders. 2023-08-28 21:56:23 +02:00
bitsawer
09c887ce82 Clear SDFGI textures when created 2023-08-28 14:13:36 +03:00
Rémi Verschelde
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
Rémi Verschelde
8a3a3aaebe
Merge pull request #80356 from darksylinc/voxelgi-dispatch-underflow
Fix integer underflow when rounding up in VoxelGI
2023-08-07 14:55:33 +02:00
Rémi Verschelde
40ca09364d
Merge pull request #80311 from darksylinc/matias-fullscreen-tri
Use fullscreen tri instead of quad
2023-08-07 14:54:21 +02:00
Rémi Verschelde
faaf27f284
Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00
clayjohn
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
Matias N. Goldberg
e783e32108 Fix integer underflow when rounding up in VoxelGI
The code wanted to divide and round up:
 - 0 / 64 = 0
 - 63 / 64 = 1
 - 64 / 64 = 1
 - 65 / 64 = 2

However when the dividend was exactly 0 it would underflow and produce
67108864 instead.

This caused TDRs on empty scenes or extremely slow performance

Fix #80286
2023-08-06 23:21:58 -03:00
Matias N. Goldberg
79c9edab3b Draw sky as a fullscreen triangle 2023-08-05 17:55:43 -03:00
Parsleigh Scumble
67c13fe4eb Use defaults to initialize sky data in case of no sky 2023-07-24 10:41:13 -07:00
Yuri Sizov
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
ChibiDenDen
35715e510f replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +03:00
Bastiaan Olij
66272ea26e Fix volumetric fog in stereo by projection vertex in combined space 2023-06-20 14:36:14 +10:00
Pedro J. Estébanez
f08f67308e Fix management of life cycle of vol. fog related uniform sets 2023-05-31 19:54:28 +02:00
Bastiaan Olij
57f343ab21 Conditionally free GI and FOG resources, they may not have been created 2023-05-22 12:59:34 +10:00
Pedro J. Estébanez
c58e50adcc Fix additional cases of breakage of rendering effects 2023-05-03 11:57:54 +02:00
Pedro J. Estébanez
09aa1bbdb3 Fix unsupported sampler filter used for voxel GI 2023-04-26 20:54:06 +02:00
Pedro J. Estébanez
2beed0d5dc Fix breakages of volumetric fog on voxel GI changes 2023-04-26 10:24:03 +02:00
Rémi Verschelde
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
Bastiaan Olij
901cd7e3fe Fix framebuffers in sky not being created on mobile renderer 2023-04-05 09:43:03 +10:00
RedMser
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
Bastiaan Olij
a8ec72cf94 Move roughness limiter and sort into their own classes 2023-03-09 21:58:55 +11:00