clayjohn
f33ffd9ab4
Add Skeletons and Blend Shapes to the OpenGL renderer
...
This uses a similar multipass approach to blend shapes
as Godot 3.x, the major difference here is that we
need to convert the normals and tangents to octahedral
for rendering.
Skeletons work the same as the Vulkan renderer except the bones
are stored in a texture as they were in 3.x.
2022-11-29 09:45:03 -08:00
Rémi Verschelde
2d1bf56510
Merge pull request #68740 from bruvzg/ios_fixes
...
[iOS] Fix getting Unicode executable path, fix error spam on start.
2022-11-28 08:31:53 +01:00
Yuri Rubinsky
5934eef44c
Changed `RenderingDevice::TextureUsageBits` type to enum flags
2022-11-26 13:08:07 +03:00
clayjohn
535f1adc8d
Fix drawing of Mesh2D
...
The batch was being discarded if no instance buffer was present, but an instance buffer is only needed for MultiMesh and particles.
2022-11-24 13:00:42 -08:00
Bastiaan Olij
a479f5af22
Improve logic for detecting and tracking extensions
2022-11-24 21:48:16 +11:00
Rémi Verschelde
e7418cac3d
Merge pull request #68942 from Chaosus/barrier_mask_flags
...
Expose `BarrierMask` as flags enum in `RenderingDevice`
2022-11-22 08:31:12 +01:00
Yuri Rubinsky
acaf38cfbc
Expose `BarrierMask` as flags enum in `RenderingDevice`
2022-11-22 09:45:20 +03:00
clayjohn
e81a1e5b5a
Expose model_matrix in GLES3 scene fragment shader
2022-11-21 09:56:08 -08:00
Rémi Verschelde
a9a75e643e
Merge pull request #68527 from pkdawson/vertex-array-offsets
...
Add `offsets` parameter to RenderingDevice::vertex_array_create
2022-11-21 11:43:28 +01:00
Rémi Verschelde
3a43d44656
Merge pull request #68830 from Ayush-singla27/issuebranch
...
fixed incorrect mesh normals in shaders
2022-11-20 11:35:52 +01:00
clayjohn
0e5a98cdd8
Fix drawing of 2D skeletons in the RD renderer.
...
Also clean up skeleton code in preparation for adding them to GLES3
Properly update Mesh2D AABBs when skeleton is updated
2022-11-18 23:36:40 -08:00
Ayush Singla
75ba0a7957
fixed incorrect mesh normals in shaders
2022-11-19 11:06:03 +05:30
Rémi Verschelde
58cb11b396
Merge pull request #68710 from BastiaanOlij/fix_vrs
...
Fix VRS issues
2022-11-18 16:19:22 +01:00
dzil123
8fab25f32f
GLES3 TextureStorage - add missing null checks
2022-11-16 23:31:59 -08:00
bruvzg
6bf9594cfb
[iOS] Fix getting Unicode executable path, fix "!configured" and "!classes.has(ti.inherits)" error spam on start.
2022-11-16 18:55:37 +02:00
Bastiaan Olij
616ba8745f
Fix VRS issues
2022-11-17 00:32:42 +11:00
Rémi Verschelde
dbf6ff0cb6
Merge pull request #68372 from Riteo/glad2
...
Regenerate GL loader code with GLAD 2
2022-11-15 11:56:16 +01:00
Rémi Verschelde
5f78f24b08
Merge pull request #68426 from clayjohn/GLES3-particles
...
Add GPUParticles to the OpenGL3 renderer.
2022-11-15 10:28:44 +01:00
Rémi Verschelde
64d7ce2a6e
Merge pull request #68628 from clayjohn/shadows
...
Implement is_animated and casts_shadows
2022-11-15 10:27:29 +01:00
clayjohn
9ce57050a5
Add GPUParticles to the OpenGL3 renderer.
...
This includes collision (2D SDF, Box, Sphere, Heightmap),
attraction (Box, Sphere), and all sorting modes.
This does not include 3D SDF collisions, trails, or
manual emission.
2022-11-14 23:28:25 -08:00
Rémi Verschelde
80dbcfd995
Merge pull request #68657 from Sauermann/fix-redundant-initialization
...
Remove redundant non-trivial Variant types initializations
2022-11-14 23:23:54 +01:00
Riteo
f6397bffb1
Regenerate GL loader code with GLAD 2
...
GLAD 1 creates unusable loaders for EGL, while the newly released GLAD 2
does not, so for consistency I thought that it would be a good idea to
uniform things beforehand. While it had some API changes some renames
were all that was needed and everything works like before, at least on
the Wayland branch.
I've kept the structure identical, although this new generator has quite
a few hefty features, such as a single header mode.
I've also added GLAD to `thirdparty/README.md`, but I haven't specified
that in the commit title because it's a very small "fix".
2022-11-14 21:48:01 +01:00
Hugo Locurcio
efe3220b2e
Fix periods in editor strings and messages
...
- Ensure all strings with ellipsis end with 3 periods instead of 2.
- Fix extraneous period in "Error calling from signal '...' to callable"
messages.
2022-11-14 19:36:36 +01:00
Markus Sauermann
3b14f0334c
Remove redundant Variant-types initializations
2022-11-14 19:35:19 +01:00
Rémi Verschelde
63cded6a85
Merge pull request #61884 from Calinou/alpha-hash-use-opaque-pipeline
...
Use opaque rendering pipeline for alpha hash materials
2022-11-14 11:08:35 +01:00
clayjohn
4abf47f407
Implement is_animated and casts_shadows
...
This allows the renderer to correctly decide when to update shadow maps
This PR also adds TIME to a few missing places
2022-11-13 14:09:21 -08:00
clayjohn
539b73384f
Implement texture_proxy_update which is needed for AnimatedTexture
2022-11-11 10:05:07 -08:00
Patrick Dawson
d7136f2d51
Add `offsets` parameter to RenderingDevice::vertex_array_create
2022-11-11 15:45:36 +01:00
Rémi Verschelde
140f039547
Merge pull request #68307 from EIREXE/goodbye_winblows
...
Fallback to IAudioClient when IAudioClient3 is not available in a more robust way
2022-11-11 10:55:08 +01:00
Rémi Verschelde
e10f8cbf40
Merge pull request #68186 from pkdawson/expose-texture-rd
...
Expose texture_get_rd_texture for scripts
2022-11-11 10:43:57 +01:00
Rémi Verschelde
1691a33eb9
Merge pull request #67374 from MrBlockers/fix-draw-primitive
...
Fix draw_primitive ignoring texture argument
2022-11-11 10:43:18 +01:00
Álex Román Núñez
499928a36d
Fallback to IAudioClient when IAudioClient3 is not available in a more robust way
2022-11-10 23:17:44 +01:00
Rémi Verschelde
f4c354630a
Merge pull request #68440 from clayjohn/redraw-TIME
...
Request redraw in OpenGL3 and mobile renderers when TIME used in shader
2022-11-09 08:58:06 +01:00
clayjohn
a1c3591461
Request redraw in OpenGL3 and mobile renderers when TIME used in shader
2022-11-08 22:52:11 -08:00
David Snopek
23603e409c
Add support for OpenGL to OpenXR
2022-11-08 18:47:11 -06:00
kobewi
d9f066d5fa
Remove duplicate project settings definitions
2022-11-08 01:29:39 +01:00
Patrick Dawson
382f0f97d6
RenderingDevice: Fix usage of index offset
2022-11-05 21:03:32 +01:00
clayjohn
3c1e5003ab
Fix pathological corner case in drawing tileset editor
...
Interleaving draw_rect calls with and without a texture forces every rect to
have its own draw call. In this case it meant that there is a draw call for every single
tile in the atlas. This change makes it so the renderer can batch draw calls
which reduced the draw call count by a factor of 512
2022-11-04 13:04:20 -07:00
Rémi Verschelde
c1fd7a0c8b
Merge pull request #68212 from dsnopek/rt-override-one-method
...
Collapse three seperate texture storage methods into render_target_set_override()
2022-11-04 10:06:50 +01:00
Rémi Verschelde
c98d6142d0
Merge pull request #68102 from BastiaanOlij/fix_render_issues_xr
...
Fix several render issues found while debugging XR
2022-11-03 22:37:42 +01:00
David Snopek
7fb8b931d7
Collapse three seperate texture storage methods into render_target_set_override()
2022-11-03 13:03:30 -05:00
Patrick Dawson
71d8de2763
Expose texture_get_rd_texture
2022-11-03 05:27:24 +01:00
Rémi Verschelde
4746e874ad
Merge pull request #67770 from clayjohn/GLES3-flip_y
...
Remove depth correction in GLES3 renderer
2022-11-03 00:32:07 +01:00
Rémi Verschelde
efefd9b198
Merge pull request #68120 from akien-mga/style-doc-cleanup
...
Style: Misc docs and comment style and language fixes
2022-11-02 22:36:31 +01:00
Rémi Verschelde
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
clayjohn
134a3046b6
Bind DirectionalLight buffer to uniform slot even when not used
...
This avoids a WEBGL error causes PanoramaSkys to fail to render
2022-11-02 10:38:59 -07:00
Rémi Verschelde
cb1931b271
Merge pull request #67639 from clayjohn/GLES3-2d-shadows
...
Add 2D shadows and canvas SDF to OpenGL3 renderer
2022-11-02 17:12:20 +01:00
clayjohn
eb07056e70
Add texture reading code to OpenGL3 renderer for web and mobile
...
This allows using texture_2d_get on all platforms which is needed for the get_image function
This commit also fixes some OpenGL warnings on the Web platform that came from attempting to map a buffer with zero length
2022-11-01 13:42:53 -07:00
Bastiaan Olij
a4e58ec84a
Fix several render issues found while debugging XR
2022-11-01 13:27:03 +11:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
...
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
d6aa3078ab
Merge pull request #54309 from ibrahn/alsa-midi-fix
...
Fix MIDI input with ALSA
2022-10-31 11:07:05 +01:00
Rémi Verschelde
e12043ae3a
Merge pull request #67729 from Riteo/workaround-extension-feature-bug
...
Check for a Vulkan extension before checking its features
2022-10-31 10:48:35 +01:00
Rémi Verschelde
5a00568afb
Merge pull request #67032 from clayjohn/GLES3-gpu-profiling
...
Add OpenGL timer queries to OpenGL3 backend
2022-10-31 10:43:13 +01:00
Yuri Rubinsky
11e1bac768
Merge pull request #67112 from Chaosus/fix_boolean_uniform_instances
2022-10-28 23:17:23 +03:00
clayjohn
2ec234ff67
Add 2D shadows and canvas SDF to OpenGL3 renderer
...
This is an initial implementation based on the current RD implementation
Performance will improve later
2022-10-28 11:33:23 -07:00
Clay John
0d711cad30
Merge pull request #66107 from devloglogan/ambient-light-disabled-fix
...
Fix ambient_light_disabled render mode flag
2022-10-27 10:08:29 -07:00
Clay John
8fd92ed867
Merge pull request #64710 from MinusKube/window-size-crash
...
Prevent windows from having a size greater than device limit
2022-10-27 10:02:44 -07:00
Clay John
e1caa8797b
Merge pull request #67043 from clayjohn/clip_children
...
Improve behaviour of clip_children by clipping to parent alpha value but still retaining parent color
2022-10-27 09:59:27 -07:00
Clay John
03e5de37ae
Merge pull request #67912 from RevoluPowered/fix-exeception-bad-access
...
Fix EXE_BAD_ACCESS caused by optional argument
2022-10-26 23:06:22 -07:00
Gordon MacPherson
56df8d5f19
Fix EXE_BAD_ACCESS caused by optional argument
...
This argument is now non optional, but this never hits the same bad access.
I voted to simplify the code here since the argument is never used optionally in our codebase.
2022-10-26 19:33:35 +01:00
Clay John
c51a42778d
Merge pull request #67541 from RandomShaper/refactor_subgroup_ads
...
Let the RD driver itself expose subgroup caps
2022-10-24 12:02:06 -07:00
Clay John
753a182797
Merge pull request #65334 from dsnopek/opengl-multiview
...
[opengl] Add multiview to the opengl3 driver
2022-10-23 17:00:01 -07:00
clayjohn
62dc9cd044
Remove depth correction in GLES3 renderer
...
This code should only have been included in the RD renderer where the
depth range is 0 - 1 instead of -1 - 1
2022-10-22 16:01:52 -07:00
keptsecret
31d44043bb
implemented mesh_surface_update_x functions
2022-10-22 16:44:33 -04:00
Riteo
3ef598c9f8
Check for a Vulkan extension before checking its features
...
For some reason AFAICT mesa reports a feature as enabled even when its
extension isn't supported. The Vulkan specification says nothing aboutd
this so this is technically more of a workaround, but it works.
2022-10-22 15:31:42 +02:00
David Snopek
398ee08375
Add multiview to the opengl3 driver
2022-10-21 21:00:32 -05:00
MrBlockers
0c4fd03f40
Fix draw_primitive ignoring texture argument
2022-10-21 21:35:13 -04:00
Pedro J. Estébanez
ae38d7930e
Let the RD driver itself expose subgroup caps
2022-10-20 19:37:35 +02:00
Riteo
dca76957b2
Use opaque composition if transparency is disabled
2022-10-19 11:01:53 +02:00
kobewi
e48c5daddf
Unify usage of GLOBAL/EDITOR_GET
2022-10-18 19:01:48 +02:00
Ibrahn Sahir
81575174cb
Fix MIDI input with ALSA.
...
Reworked the handling of ALSA RawMidi input to support:
- Running Status.
- RealTime Category messages arriving during other messages data.
- Multiple connected RawMidi interfaces.
2022-10-17 10:12:40 +01:00
Rémi Verschelde
dc4b616596
Merge pull request #63332 from KoBeWi/static_images_aka_photos
...
Make some Image methods static
2022-10-15 12:56:57 +02:00
Rémi Verschelde
6feded171b
Merge pull request #67416 from clayjohn/GLES3-primitive
...
Fix drawing of 2D primitives in OpenGL3 renderer
2022-10-15 12:56:38 +02:00
clayjohn
6d048af42f
Fix drawing of 2D primitives in OpenGL3 renderer
...
Previously the wrong vertices were used when assembling the second triangle
of a quad
2022-10-14 16:55:14 -07:00
clayjohn
978aa05a99
Fix error in Web builds that resulting in 2D
...
objects not drawing in the GLES3 backend.
Issue came from not binding a light UBO when using the DISABLE_LIGHTING
code path
2022-10-14 11:18:27 -07:00
clayjohn
b6f44859d7
Implement multiple clip_children modes for CanvasItems
2022-10-14 08:02:28 -07:00
kobewi
072f6feaba
Make some Image methods static
2022-10-14 14:34:15 +02:00
bruvzg
88adb6513e
Detect Wine and disable unsupported IAudioClient3 interface.
2022-10-14 09:57:49 +03:00
clayjohn
09b1a6f85f
Improve behaviour of clip_children by clipping
...
to parent alpha value, but still retaining
parent color
2022-10-13 18:35:12 -07:00
Rémi Verschelde
367a9b8056
Merge pull request #67335 from clayjohn/GLES3-2d-lights
...
Add 2D lights to OpenGL3 canvas renderer
2022-10-13 09:05:36 +02:00
Rémi Verschelde
f2bd389e21
Merge pull request #67307 from TechnoPorg/lod-radial-distance
...
Use radial distance for making LOD decisions.
2022-10-13 09:05:00 +02:00
clayjohn
e600fb93a5
Add 2D lights to OpenGL3 canvas renderer
...
This is an initial implementation using the same single-pass approach as the RenderingDevice.
2022-10-12 17:55:01 -07:00
TechnoPorg
b04350828e
Use radial distance for making LOD decisions.
...
Previously, only forward basis distance from the camera was used.
This means that unnecessarily high LOD levels were used for objects located to the side of the camera.
The distance from the camera origin is now used, independently of direction.
2022-10-12 07:21:42 -06:00
Clay John
d5ae80c8bd
Merge pull request #67227 from BastiaanOlij/vkCreateRenderPass2KHR_fallback
...
Added fallback to vkCreateRenderPass
2022-10-11 22:46:42 -07:00
Bastiaan Olij
64a78c3dad
Added fallback to vkCreateRenderPass if VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME isn't supported
2022-10-12 09:31:56 +11:00
Clay John
18d2035a3d
Merge pull request #67110 from Chaosus/fix_incorrect_vec3_ubo_fill
...
Fix incorrect offset for vec3 datatypes in `_fill_std140_ubo_empty`
2022-10-11 12:24:48 -07:00
Rémi Verschelde
6d534f6e89
Merge pull request #66221 from Mickeon/painstakingly-appending-ds-en-you-tea-es
...
Rename remaining "*_enable" to "*_enabled"
2022-10-11 16:17:02 +02:00
Rémi Verschelde
5aadc618b6
Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfo
...
Fetch video adapter driver name and version from OS
2022-10-11 13:59:53 +02:00
MJacred
de768afbdc
Fetch video adapter driver name and version from OS on Linux/*BSD and Windows
2022-10-11 12:39:41 +02:00
Rémi Verschelde
a92c564a02
Cleanup unused defines in platform code
2022-10-11 11:52:41 +02:00
Rémi Verschelde
3306ffefd1
Merge pull request #67000 from RandomShaper/split_render_further
...
Polish rendering driver refactor further
2022-10-11 09:23:32 +02:00
Rémi Verschelde
8017827144
SCons: Re-enable treating `#warning` as error with `werror`
...
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.
We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02:00
Rémi Verschelde
4e4e16f9a9
SCons: Cleanup GCC warnings configuration
...
- Outright disable spammy warnings due to past or present GCC bugs:
* `-Wno-strict-overflow` for GCC 7.
* `-Wno-type-limits` for GCC before 11 (regressed in 9/10, might work in
earlier releases but at this stage we don't care).
* `-Wno-return-type` for GCC 12/13 (regression, still not fixed).
- Enable extra warnings conditionally when broken on earlier GCC:
* `-Wnoexcept` was removed due to an upstream regression in GCC 9, could
be re-enabled (but commented out for now as we actually have `-Wnoexcept`
warnings to fix.
* `-Wlogical-op` was broken on our variadic templates before GCC 11, now
seems fine.
2022-10-10 16:12:26 +02:00
Yuri Rubinsky
f4db4bb7a2
Fix incorrect setup of boolean uniform instances
2022-10-09 08:50:18 +03:00
Yuri Rubinsky
816600382e
Fix incorrect offset for vec3 datatypes in `_fill_std140_ubo_empty`
2022-10-09 06:32:50 +03:00
clayjohn
4765e5fa64
Allow clearing backbuffer after finishing CanvasGroup
...
This avoids an issue where having multiple CanvasGroups overlap
would create a weird artifact
2022-10-07 14:13:40 -07:00
clayjohn
aca964de4f
Add OpenGL timer queries to OpenGL3 backend
...
This is useful for the visual debugger, printing FPS, and the in-editor FPS display
2022-10-07 09:25:09 -07:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
2022-10-07 11:32:33 +03:00
Pedro J. Estébanez
24ff292999
Polish rendering driver refactor further
...
Mainly:
- Make `max_descriptors_per_pool` project setting Vulkan-specific.
- Use a common, render driver agnostic magic FourCC for shader binary data.
- Downgrade spirv_reflect to Vulkan-only dependency.
- Add a `RENDER_DRIVER_*` macro to GLSL shader code for per-driver customizations.
2022-10-06 21:08:54 +02:00
clayjohn
154b9c1c91
Use a giant UBO to optimize performance in 2D
...
This removes the countless small UBO writes we had before
and replaces them with a single large write per render pass.
This results in much faster rendering on low-end devices
but improves speed on all devices.
2022-10-06 11:24:45 -07:00