Commit graph

3652 commits

Author SHA1 Message Date
Jordi Scharp
ac87d5f9a2 Fix issue where the UV's were off in Compatibility
Fixes a bug where CanvasTexture's UVs were off when using the Compatibility mode's renderer.

Fixes #86746
2024-01-11 13:26:57 +01:00
Alessandro Famà
998078f8d7 Fix Dummy audio driver initialization issue on WASAPI output device initialization failure
`AudioDriverWASAPI::init` consistently returns `Error::OK`, even when encountering a failure during the initialization of the output device. This behaviour blocks the dummy driver from initializing in `AudioDriverManager::initialize`.
2024-01-09 17:36:13 +01:00
Rémi Verschelde
a56dd6ca52
Merge pull request #86920 from griffinkh/build_warning_fix
Fix build warning with memset value being too large
2024-01-09 11:29:55 +01:00
Dominic Austria
c8bdd1d774 implement overdraw, lighting, and unshaded debug draw modes for opengl 2024-01-08 17:34:09 -05: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
Griffin Kroah-Hartman
b97cb5ec59 Fix build warning with memset value being too large
Should resolve issue #83342
2024-01-08 17:26:41 +01:00
Rémi Verschelde
25011e9144
Merge pull request #84244 from BastiaanOlij/skip_present_if_needed
Skip swapchain logic if there is nothing to present (Android OpenXR)
2024-01-08 14:52:07 +01:00
Rémi Verschelde
c10d268974
Merge pull request #86787 from ryevdokimov/code-spell-check
Fix various spelling errors across engine solution
2024-01-08 11:55:55 +01:00
Bastiaan Olij
d6caa69e11 Skip swapchain logic if there is nothing to present (Android OpenXR) 2024-01-08 21:51:04 +11:00
Rémi Verschelde
774c4631fd
Merge pull request #84733 from clayjohn/GL-CanvasGroup-performance
Only copy the relevant portion of the screen when copying to backbuffer in Compatibility backend
2024-01-08 11:50:12 +01:00
Pedro J. Estébanez
e1c7c18ead Fix determination of copyable layout for compressed textures in Vulkan 2024-01-06 00:06:28 +01:00
Rémi Verschelde
e72e63a6b5
Merge pull request #85837 from akien-mga/clang-format-16
Style: Mark clang-format 16 as supported for pre-commit hook
2024-01-05 12:04:44 +01:00
Rémi Verschelde
d1b7c60afc
Merge pull request #77712 from nklbdev/Fix_lossless_formats_in_PortableCompressedTexture2D
Fix lossless formats in PortableCompressedTexture2D
2024-01-05 12:02:14 +01:00
nklbdev
47d991678d Fix lossless formats in PortableCompressedTexture2D
Update scene/resources/portable_compressed_texture.cpp

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-01-05 00:11:01 +05:00
Rémi Verschelde
5d44c85d4c
Merge pull request #84107 from BlueCube3310/file-access-optimization
Use platform-specific methods for FileAccess reading and writing
2024-01-04 16:39:47 +01:00
Robert Yevdokimov
f9826a1dd7 Fix various spelling errors 2024-01-04 09:56:43 -05:00
Rémi Verschelde
c921b6587c
Merge pull request #84469 from time-killer-games/patch-1
Fix NetBSD executable path
2024-01-04 14:25:46 +01:00
Rémi Verschelde
6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
Rémi Verschelde
37df2ff387
Merge pull request #86682 from Daylily-Zeleen/daylily-zeleen/distinguish_between_dynamic_libaray_not_found_and_can't_open
Distinguish between dynamic library not found and can't be opened.
2024-01-02 18:06:17 +01:00
bruvzg
126a763f7a
[D3D12] Dynamically load Agility SDK. 2024-01-02 17:15:59 +02:00
Rémi Verschelde
f3df5f7d37
Merge pull request #86435 from jsjtxietian/fix-fp-unsupport
Add `RD_ENABLED` when `VULKAN_ENABLED` or `D3D12_ENABLED` is added
2024-01-02 15:09:05 +01: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
Daylily-Zeleen
fe6b073811 Distinguishs between dynamic library not found and can't be opened. 2024-01-01 20:01:57 +08:00
jsjtxietian
078bfae6a4 Add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is added 2023-12-25 11:13:01 +08:00
Yuri Sizov
7d03a22329 Merge pull request #86405 from warriormaster12/pipeline-message-fix
Fix wrong error message when graphics pipeline creation fails
2023-12-22 17:20:15 +01:00
Yuri Sizov
44ded3eaa4 Merge pull request #86316 from clayjohn/RD-BFN-normals
Use best fit normals for storing screen space normals
2023-12-22 17:19:58 +01:00
clayjohn
43cf21cb71 Use best fit normals for storing screen space normals 2023-12-21 14:41:29 -07:00
warriormaster12
e729d511df Fix wrong error message when graphics pipeline creation fails 2023-12-21 22:32:58 +02:00
Pedro J. Estébanez
12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +01:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Rémi Verschelde
5088cd8ab7
Merge pull request #86018 from BastiaanOlij/fix_gles_stereo_sky
Fix radiance for sky in GLES stereo rendering
2023-12-13 10:32:23 +01:00
Rémi Verschelde
41365c6c8b
Merge pull request #70315 from RandomShaper/d3d12_mesa
Direct3D 12 Rendering Driver (Mesa NIR approach)
2023-12-12 21:58:57 +01:00
Pedro J. Estébanez
2f47c57385 Add Direct3D 12 RenderingDevice implementation 2023-12-12 19:10:04 +01:00
Rémi Verschelde
342531597b
Merge pull request #85811 from clayjohn/2D-render-info
Implement render info counters for the 2D renderer
2023-12-12 10:41:06 +01:00
Bastiaan Olij
e06ac4d40c Fix radiance for sky in GLES stereo rendering 2023-12-12 13:35:39 +11:00
Rémi Verschelde
ae7c533937
Merge pull request #84686 from dsnopek/webxr-msaa
Add MSAA support for WebXR
2023-12-12 00:17:16 +01:00
Rémi Verschelde
4943b6e6b3
Merge pull request #84451 from ShirenY/FixSkeletonMeshCulling
Transform mesh's AABB to skeleton's space when calculating mesh's bounds
2023-12-12 00:16:51 +01:00
David Snopek
275c496bc8 Add MSAA support for WebXR 2023-12-11 09:01:24 -06:00
clayjohn
777d6ae1c6 Ensure that 2D meshes use a proper input mask
The input mask was wrongly ignored in earlier versions. Now it is actually used so the input mask variable needs to be a valid number
2023-12-09 12:15:59 -07:00
ShirenY
27f71c4e78 Transform mesh's AABB to skeleton's space when calculate mesh's bounds. 2023-12-09 11:41:15 +08:00
Yuri Sizov
36f260babe Merge pull request #85778 from HolySkyMin/weird_box_killer_try2
GLES3: Skip batches with zero instance count while rendering canvas
2023-12-08 16:58:49 +01:00
Yuri Sizov
c2151bbfbf Merge pull request #85621 from daustria/opengl-compatibility-wireframe
Add wireframe for compatibility mode
2023-12-08 15:23:41 +01:00
Yuri Sizov
b0339b68ff Merge pull request #85532 from RandomShaper/kill_redund_clear
Apply some low-hanging fruit optimizations to Vulkan RD
2023-12-08 15:23:36 +01:00
Yuri Sizov
44d544fc98 Merge pull request #85120 from dsnopek/gl-lightmap
OpenGL: Implement rendering of lightmaps
2023-12-08 15:23:27 +01:00
Rémi Verschelde
a311a4b162
Merge pull request #83976 from BastiaanOlij/gles3_msaa_scaler
Add 3D MSAA and scaling support to GLES3
2023-12-07 14:36:42 +01:00
clayjohn
528b4a3283 Implement render info counters for the 2D renderer
This provides information for the debug monitors
2023-12-06 14:39:33 -07:00
Rémi Verschelde
49f4860ce3
Style: Mark clang-format 16 as supported for pre-commit hook
It only introduced a difference in a .glsl file, which I've worked
around by removing an empty line. This keeps formatting consistent
between clang-format 15 and 16.

Also added a change in the 3-to-4 project converter to fix bogus
formatting in clang-format < 17.
2023-12-06 13:26:53 +01:00
HolySkyMin
51dcb38840 GLES3: Skip batches with zero instance count while rendering 2023-12-05 18:49:59 +09:00
David Snopek
749f60ee36 OpenGL: Implement rendering of lightmaps 2023-12-04 18:34:06 -06:00
Bastiaan Olij
caddce14dd Add 3D MSAA and scaling support to GLES3 2023-12-05 10:01:00 +11:00
Rémi Verschelde
74e49b7271
Merge pull request #85092 from clayjohn/GL-vertex-input-mask
Use vertex input mask for creating vertex arrays
2023-12-04 23:10:26 +01:00
Rémi Verschelde
a9ba8695d4
Merge pull request #84852 from Alex2782/fix_vulkan_buffer_android
Vulkan: Fix incorrect access to the buffers on Android
2023-12-04 23:06:04 +01:00
Rémi Verschelde
6f16e3f257
Merge pull request #84416 from jsjtxietian/shadow_disabled
Add `shadows_disabled` macro in Compatibility renderer
2023-12-04 23:03:10 +01:00
Rémi Verschelde
6f4da7a976
Merge pull request #83736 from darksylinc/matias-broken_buffer_update
Fix buffer updates going to the wrong cmd buffer if barriers were 0
2023-12-04 22:58:24 +01:00
Rémi Verschelde
1749ea8d00
Merge pull request #82804 from BlueCube3310/compat_correct_normals
Automatically ensure correct normals in Compatibility renderer
2023-12-04 22:57:59 +01:00
Dominic
bae6f86257 Add wireframe for compatibility mode 2023-12-02 13:09:56 -05:00
Pedro J. Estébanez
72bf8dfecf Remove superfluous locking in RID owners in Vulkan RD 2023-12-01 16:12:21 +01:00
Pedro J. Estébanez
4964d9a083 Remove redundant explicit clears in the Vulkan RD 2023-12-01 16:11:59 +01:00
Rémi Verschelde
bd74d92ef7
Merge pull request #84957 from BastiaanOlij/fix_msaa2d_when_no_2d
Ensure 2D MSAA resolve is performed when 3D content but no 2D content in scene
2023-11-22 21:56:23 +01:00
clayjohn
c0c1efc5da Use vertex input mask for creating vertex arrays
Also fix bug in creation of vertex input mask
2023-11-19 16:32:55 +01:00
Bastiaan Olij
47983e30c5 Ensure 2D MSAA resolve is performed when 3D content but no 2D content in scene 2023-11-16 13:34:34 +11:00
Gabor Koncz
0198eedb06 Remove incorrect system_fbo overwrite 2023-11-16 01:56:20 +01:00
Alexander Hartmann
04a142cf71 Vulkan: Fix incorrect access to the buffers on Android 2023-11-15 14:46:25 +01:00
clayjohn
ead36fdcc4 Store ArrayMesh path in RenderingServer for use in error messages 2023-11-14 16:27:10 +01:00
Rémi Verschelde
787e98e955
Merge pull request #84752 from akien-mga/gles3-shaderdata-initialize
GLES3: Ensure all ShaderData is properly initialized in `set_code`
2023-11-13 12:20:33 +01:00
Rémi Verschelde
ef2cc1cc2b
Merge pull request #84741 from lawnjelly/bogus_shader_log
[GLES3] Protect against bogus `glGetShaderInfoLog` return values.
2023-11-12 12:15:31 +01:00
Rémi Verschelde
ba713c80df
Fix various typos with codespell
Using 2.2.7.dev51+geb4a58fe.
2023-11-11 23:01:24 +01:00
Rémi Verschelde
0e04203293
GLES3: Ensure all ShaderData is properly initialized in set_code
Fixes #84418.
2023-11-11 15:13:23 +01:00
lawnjelly
593cdf00ff [GLES3] Protect against bogus glGetShaderInfoLog return values.
On some buggy drivers `GL_INFO_LOG_LENGTH` returns incorrect values, which may lead to incorrectly filling in the log string. This could lead to uninitialized data being attempted to be printed and a crash.
This PR zeros the array to ensure uninitialized data is not used.
2023-11-11 06:56:46 +00:00
clayjohn
e69968b794 Only copy the relevant portion of the screen when copying to backbuffer in Compatibility backend 2023-11-11 00:17:26 +01:00
clayjohn
9c5adac342 Properly rename INSTANCE_ID and VERTEX_ID in canvas item shaders in the compatibility backend 2023-11-07 17:55:51 +01:00
jsjtxietian
716fd3edfc Add shadows_disabled macro in Compatibility renderer 2023-11-07 18:55:26 +08:00
Samuel Venable
52da1e9b6b Fix NetBSD Executable Path 2023-11-06 06:33:36 -08:00
Rémi Verschelde
95b8a75aaf
Merge pull request #84288 from bruvzg/angle_detect_2
[macOS] Improve ANGLE support detection.
2023-11-02 09:11:55 +01:00
Rémi Verschelde
44a54f4500
Merge pull request #84252 from clayjohn/ensure_tangents
Enhance checks and user experience around tangent arrays in meshes.
2023-11-02 09:11:32 +01:00
clayjohn
d1043a5f93 Enhance checks and user experience around tangents.
Ensure `ensure_tangents` option actually creates tangent array. Even if it is just a dummy array.

Allow mesh to generate its own tangents when using compression. This allows users to compress meshes without tangents.

Warn users if they are trying to read from tangents without providing tangents.
2023-11-01 22:40:42 +01:00
bruvzg
4c74c7d11a
[macOS] Improve ANGLE support detection.
Try opening EGL display when checking if ANGLE is supported.
2023-11-01 08:34:35 +02:00
David Snopek
67d8102f95 Fix WebXR on desktop emulator by reseting active texture unit 2023-10-31 16:18:38 -05:00
David Snopek
a039d0b61a Linux: Disable RTLD_DEEPBIND mode for dlopen() in sanitizer builds 2023-10-30 16:16:08 -05:00
Rémi Verschelde
dcbee437f7
Merge pull request #84197 from bruvzg/opengl_utf8
Parse OpenGL and Vulkan strings as UTF-8.
2023-10-30 17:47:51 +01:00
bruvzg
25dc729dd4
Parse OpenGL and Vulkan strings as UTF-8. 2023-10-30 17:24:31 +02:00
Rémi Verschelde
acbc341a58
OpenGL: Fix uninitialized memory usage for GPUPartciles interp_to_end
Fixes #84072.
2023-10-30 15:08:24 +01:00
BlueCube3310
6ed1731746 Use platform-specific methods for FileAccess reading and writing 2023-10-29 17:34:18 +01:00
Rémi Verschelde
c5c90fd7b7
Merge pull request #83998 from chybby/83380-soft-shadows
Fix reading shadow filter quality from project settings in compatibility
2023-10-26 16:02:08 +02:00
Rémi Verschelde
2dafd06114
Merge pull request #83906 from clayjohn/GL-vertex-padding
Add padding to normal attribute in Compatibility renderer to match the RD renderers
2023-10-26 16:00:56 +02:00
Rémi Verschelde
253711ec98
Merge pull request #82430 from RandomShaper/fix_gles3_tex_free
[GLES3] Avoid freeing proxy textures clearing onwer's data
2023-10-26 15:58:55 +02:00
Adam Chyb
b9446dde7e Fix reading shadow filter quality from project settings in compatibility
Fixes #83380.
2023-10-26 23:57:42 +11:00
Rémi Verschelde
46cb7f94f7
Merge pull request #83988 from bruvzg/egl_static
Fix macOS and Windows build with statically linked ANGLE/EGL.
2023-10-26 12:10:56 +02:00
Rémi Verschelde
815b24d280
Merge pull request #83491 from jsjtxietian/pass-screen-size-when-render-shadow
Pass viewport size to shadow pass instead of using Vector2i(1,1)
2023-10-26 12:09:21 +02:00
bruvzg
2d0cd5f2cd
Fix macOS and Windows build with statically linked ANGLE/EGL. 2023-10-26 12:15:59 +03:00
jsjtxietian
26d32554bd Pass viewport size to shadow pass instead of using vector2i(1,1) 2023-10-26 15:25:22 +08:00
Rémi Verschelde
1b3e00dc29
Merge pull request #83930 from underdoeg/feature-support-egl-1-4
Add support for EGL 1.4
2023-10-26 08:58:46 +02:00
Philip Whitfield
249aed43bf add support for EGL 1.4 2023-10-25 12:08:48 +02: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
clayjohn
a88e519f18 Add padding to normal attribute in Compatibility renderer to match the RD renderers 2023-10-24 22:32:34 +02:00
Rémi Verschelde
261fe7ce6a
Merge pull request #83704 from clayjohn/misc-mesh-fixes
Some more fixes for compressed meshes
2023-10-24 10:54:23 +02:00
Rémi Verschelde
64f80295e5
Merge pull request #83199 from Repiteo/texture-storage-default-scale
Fix `TextureStorage` not assigning default scale
2023-10-24 10:53:56 +02:00
clayjohn
8f9cd4e1e3 Some more fixes for compressed meshes
This cleans up a few more cases of uint32_t->uint64_t

Importantly this fixes an edge case in the axis-angle compression by
using the pre-existing Basis methods instead
2023-10-24 09:38:12 +02:00
Rémi Verschelde
50d17f6b8c
Merge pull request #83613 from clayjohn/surface_upgrade_tool
Add an editor tool to automatically upgrade and re-save meshes
2023-10-24 00:10:37 +02:00
clayjohn
318ef8461f Implementation of tool to automatically upgrade and re-save meshes 2023-10-23 22:39:48 +02:00