Rémi Verschelde
e0651ed4b5
Merge pull request #78199 from clayjohn/detect_3d
...
Ensure that "detect 3D" is only called when using 3D shaders
2023-06-14 09:26:47 +02:00
Bastiaan Olij
6dd47e232b
Expose RD::texture_native_handle
2023-06-14 09:58:08 +10:00
clayjohn
0b7e2dfdfc
Ensure that "detect 3D" is only called when using 3D shaders
2023-06-13 13:20:11 -07:00
clayjohn
9721a27427
Use Gaussian approximation for backbuffer mipmaps in GL Compatibility renderer
2023-06-12 21:51:23 -07:00
Rémi Verschelde
9ce42d176d
Merge pull request #76977 from manueldun/light-shader-builtins
...
Enable the use of all supported builtins on the light shader
2023-06-09 11:04:46 +02:00
Rémi Verschelde
166643df32
Merge pull request #74937 from bitsawer/fix_uniform_storage
...
Fix shader uniform storage conversions and crash
2023-06-09 11:04:16 +02:00
Manuel Dun
e2321c21db
Enable the use of all builtins on the light shader
...
When using the light process in spatial shader,
the built-ins work as spected, now they work in forward+,
mobile and compatibility renderer.
2023-06-08 14:14:14 -04:00
Rémi Verschelde
9e4315bb50
Style: Harmonize header includes in platform ports
...
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.
The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
2023-06-08 15:19:19 +02:00
clayjohn
05142b6228
Properly update array textures when using the OpenGL backend to avoid crash
2023-06-07 15:44:11 -07:00
Rémi Verschelde
e75285f69f
Merge pull request #77946 from bruvzg/opengl_blend_cache
...
[OpenGL] Fix LCD blend mode color caching.
2023-06-07 11:02:30 +02:00
bruvzg
a2abea8b98
[OpenGL] Fix LCD blend mode color caching.
2023-06-07 10:55:38 +03:00
MJacred
2c5e2196bd
Replace get_rendering_device() call to prevent crashes on OpenGL.
...
And make OpenGL video adapter info align with Vulkan.
2023-06-06 23:29:36 +02:00
Rémi Verschelde
3dd0307f3f
Merge pull request #76348 from warriormaster12/pipeline-cache
...
Implement Vulkan pipeline caching
2023-06-01 00:40:33 +02:00
warriormaster12
dded713dc0
Implement Vulkan pipeline caching
2023-05-31 22:24:18 +03:00
bitsawer
23c375d6b4
Fix shader uniform storage conversions and crash
2023-05-29 15:17:13 +03:00
Rémi Verschelde
f2e91eae63
Merge pull request #77224 from patrickdown/implement_texture_2d_layered_initialize
...
Implemented texture_2D_layered_initialize
2023-05-29 10:29:08 +02:00
patrickdown
391a1bf60e
Implemented texture_2D_layered_initialize
2023-05-27 12:53:59 -05:00
Yuri Sizov
f6dcd7f51a
Merge pull request #75181 from dalexeev/fix-light-only-mode
...
Fix "Light Only" mode of `CanvasItemMaterial`
2023-05-27 17:28:29 +02:00
Dani Frank
6d3634e29f
fix gles texture uniform array binding
2023-05-26 23:11:02 +03:00
Rémi Verschelde
2ab0f17f3b
Merge pull request #77409 from allenwp/OpenGL3-Blend-Issue76334
...
Fixed issues with blend modes in OpenGL 3 renderer
2023-05-24 18:36:06 +02:00
Allen Pestaluky
51f0e36509
Fixed issues with blend modes in OpenGL 3 renderer
...
Added uses_blend_alpha = true for ADD, SUBTRACT, and MULTIPLY blend modes to match the other renderers
Fixes #76334
2023-05-24 10:35:23 -04:00
Rémi Verschelde
8b0530be64
Merge pull request #77022 from sakrel/fix_buffer_get_data
...
RenderingDeviceVulkan::buffer_get_data: Use draw command buffer instead of setup command buffer
2023-05-24 08:47:19 +02:00
Rémi Verschelde
852740a627
Merge pull request #76053 from MightiestGoat/fix-sky-auto-exposure
...
Fix the grainy sky while using debanding.
2023-05-24 08:46:28 +02:00
Rémi Verschelde
b917f748b5
Merge pull request #75945 from Calinou/renderingdevice-finalaction-fix-typo
...
Fix typo in FinalAction `switch` statement in RenderingDevice
2023-05-24 08:46:01 +02:00
Rémi Verschelde
05ddc822fb
Merge pull request #77265 from lyuma/aabb_bone_lod_inside
...
Fix calculation of skinned AABB for unused bones.
2023-05-22 13:49:19 +02:00
Lyuma
791d8001db
Fix AABB for unused bones
...
Fixes bug where bounding box of 1 unit was used in some skinned models and had wrong LODs.
(this could become very large if the mesh is scaled, such as FBX conversions)
Also fixes a mistake in calcualting bone index.
2023-05-19 19:47:52 -07:00
Markus Grafen
8a3e829930
(Re-)Implemented Light3D's property "shadow_reverse_cull_face"
...
The parameter shadow_reverse_cull_face is now passed to the shadow pass so that the mesh back-faces are used for shadow map calculation.
2023-05-19 19:22:10 +02:00
ChibiDenDen
14e9a61ebc
Verify gles3 cached shader load successful
2023-05-17 19:36:30 +03:00
Danil Alexeev
43b0702a02
Fix "Light Only" mode of `CanvasItemMaterial`
2023-05-13 09:06:09 +03:00
sakrel
f52c151fcf
RenderingDeviceVulkan::buffer_get_data: Use draw command buffer instead of setup command buffer
2023-05-12 23:25:20 +02:00
Rémi Verschelde
373f2a8f8b
Merge pull request #76541 from KoBeWi/WAZZUP
...
Add mono audio support to WASAPI
2023-05-12 14:09:10 +02:00
Rémi Verschelde
d0305e5c62
Merge pull request #76959 from stolk/initlight
...
Initialize light intensity parameter before use.
2023-05-12 10:04:57 +02:00
Rémi Verschelde
cc48827e4a
Merge pull request #76946 from AThousandShips/shadow_warning
...
Enable shadow warnings and fix raised errors
2023-05-12 10:04:09 +02:00
Bram Stolk
14494e08d1
Initialize light intensity parameter before use.
...
Unlike renderer_rd, the gles3 light storage fails to initialize
the intensity of the light.
To avoid using garbage memory, possibly NaN, we use the same
default value that renderer_rd uses.
Fixes #76956
2023-05-11 09:46:46 -07:00
warriormaster12
10797d58dd
fixed a query pool validation error
2023-05-11 17:17:23 +03:00
Ninni Pipping
71ee65dc57
Enable shadow warnings and fix raised errors
2023-05-11 16:00:59 +02:00
Rémi Verschelde
564d1b34e0
Merge pull request #74711 from BastiaanOlij/add_texture_native_handle
...
Provide access to internal graphics handles for textures
2023-05-09 19:28:26 +02:00
Rémi Verschelde
668cf3c66f
Merge pull request #76832 from RandomShaper/cluster_render_prevail
...
Save cluster render shader from being optimized out entirely
2023-05-09 10:46:23 +02:00
Rémi Verschelde
1c7a62d2c0
Merge pull request #76092 from ChibiDenDen/shader_cache_gles3
...
Add shader cache to gles3
2023-05-09 10:45:10 +02:00
Bastiaan Olij
c328676d96
For GDExternal use, provides access to internal graphics handles for textures
2023-05-09 13:47:22 +10:00
Pedro J. Estébanez
6465432570
Save cluster render shader from being optimized out entirely
2023-05-08 18:39:49 +02:00
Rémi Verschelde
392fdd106d
Merge pull request #75937 from RandomShaper/threaded_render_load
...
Allow creation of rendering buffers at any time
2023-05-08 13:52:33 +02:00
Rémi Verschelde
e370b3538b
Merge pull request #74945 from ChibiDenDen/patch-3
...
Fix gles3 rendering on android studio emulator
2023-05-08 13:52:28 +02:00
Hugo Locurcio
5056c427d3
Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation
...
This brings the overall class reference completion percentage from 87% to 92%.
2023-05-06 22:40:32 +02:00
ChibiDenDen
6441210177
Add ARB_get_program_binary to glad to support shader cache over desktop GL
2023-05-06 00:20:37 +03:00
Max Hilbrunner
39d85308fd
Merge pull request #76109 from paddy-exe/fix-node-position-view
2023-05-05 14:35:41 +02:00
Max Hilbrunner
5e9b7c3452
Merge pull request #75055 from JohanAR/light_specular
2023-05-05 13:53:02 +02:00
Samuele Panzeri
59f04e16b8
Support long path in file access on windows
...
Changed windows file access file to check for path length and use the \\?\ long format when needed
2023-05-05 10:04:39 +02:00
Johan Aires Rastén
8452e6cdb3
Add SPECULAR_AMOUNT spatial light shader built-in
...
Light3D has a light_specular property which is used to set the
intensity of specular contributed by this light source, but it was
previously only used by the default material light shader, and not
possible to use in a custom light() shader.
2023-05-04 09:15:12 +02:00
Patrick
e35bbd76a3
Fix Rotation Issue with NODE_POSITION_VIEW Visual Shader Node
2023-05-03 19:59:43 +02:00
ChibiDenDen
5956aa1a6a
Fix gles3 rendering on android studio emulator
...
Use a temporary framebuffer for screen copy from rendertarget to screen.
This solves GLES3 rendering in android studio emulator (before this change there is just a black screen)
Based on discussion in:
https://github.com/godotengine/godot/issues/74828
2023-04-29 16:21:54 +03:00
kobewi
8d010b44c1
Add mono audio support to WASAPI
2023-04-28 13:29:43 +02:00
Samuele Panzeri
4aaa2e6477
Fix wait for thread not started
2023-04-27 20:28:22 +02:00
Rémi Verschelde
359b494cbe
Merge pull request #76437 from RandomShaper/fix_vol_fog_voxel_gi
...
Fix voxel GI issues
2023-04-27 08:19:06 +02:00
Pedro J. Estébanez
09aa1bbdb3
Fix unsupported sampler filter used for voxel GI
2023-04-26 20:54:06 +02:00
Rémi Verschelde
b58873b98a
Merge pull request #69833 from Eoin-ONeill-Yokai/audio_invalid_mixrate
...
Fix crash caused by invalid mix_rate assignment due to bogus project settings.
2023-04-26 11:35:37 +02:00
Eoin O'Neill
5a08091168
Fix crash caused by invalid mix_rate assignment due to bogus
...
project settings.
We'll default to a sensible value in the case that a user has
somehow managed to modify the configuration file incorrectly.
Closes 69819
2023-04-25 23:52:50 -07:00
Rémi Verschelde
367ad3545d
Merge pull request #76315 from RandomShaper/vk_fix_barriers
...
Fix issues with Vulkan layout transitions
2023-04-25 09:59:55 +02:00
bruvzg
628f3b2f79
[OS] Implement and expose to scripting APIs `get_memory_info` method instead of old `get_free_static_memory`.
2023-04-24 14:08:55 +03:00
Pedro J. Estébanez
882b869220
Fix issues with Vulkan layout transitions
2023-04-24 12:24:24 +02:00
Johan Aires Rastén
14a8124ffe
Add LIGHT_IS_DIRECTIONAL built-in for spatial shaders
2023-04-20 14:33:30 +02:00
Rémi Verschelde
27253f3eb2
Merge pull request #76240 from clayjohn/Light2D-artifacts
...
Clamp normal when calculating 2D lighting to avoid artifacts
2023-04-19 10:13:56 +02:00
clayjohn
ab603e347f
Clamp normal when calculating 2D lighting to avoid artifacts
2023-04-18 17:26:17 -07:00
Rémi Verschelde
c2edf14faf
Merge pull request #75881 from bruvzg/win_coinit
...
[Windows] Cleanup COM library initialization/uninitialization.
2023-04-18 23:40:06 +02:00
Rémi Verschelde
63d17df83e
Merge pull request #74978 from bruvzg/linux_version_check
...
[Linux/BSD] Add dynamically loaded library version checks.
2023-04-18 23:38:51 +02:00
ChibiDenDen
4adbfcfbb2
Add shader cache to gles3
2023-04-15 18:41:10 +03:00
mightygoat
69f634ac78
Fix the grainy sky while using debanding
2023-04-15 10:43:46 +05:30
Rémi Verschelde
e6e52f9154
Merge pull request #75162 from ecmjohnson/gpuparticles_inf_translate
...
GPUParticles3D: Translate inactive particles to -INF
2023-04-13 09:53:04 +02:00
Erik Johnson
6229c2a1f9
Translate inactive particles to -INF
2023-04-12 19:32:39 -04:00
clayjohn
9be0a73294
Add EXPOSURE built in to spatial shaders
...
This allows users to restore light values to pre-pre-exposure amounts
2023-04-12 10:35:13 -07:00
Rémi Verschelde
5e34a28bd7
Merge pull request #73313 from clayjohn/particles-split
...
Properly calculate lifetime_split for particles
2023-04-12 17:01:17 +02:00
Rémi Verschelde
6e0c7d6a98
Merge pull request #75968 from clayjohn/GL-depth-write
...
Ensure that depth write state is updated before transparent pass in OpenGL3 renderer
2023-04-12 09:08:30 +02:00
Rémi Verschelde
ecbb196728
Merge pull request #75954 from clayjohn/GL-multimesh-one
...
Check for instancing without relying on instance_count when drawing 2D meshes
2023-04-12 09:08:06 +02:00
Rémi Verschelde
6a6e36ec6a
Merge pull request #75795 from cody82/fix-html-particle-shader
...
Fix "error X3708: continue cannot be used in a switch" in HTML export
2023-04-12 09:06:57 +02:00
clayjohn
ed0c378bda
Ensure that depth write state is updated before transparent pass in OpenGL3 renderer
2023-04-11 21:17:24 -07:00
clayjohn
579ca03e88
Check for instancing without relying on instance_count when drawing 2D meshes
...
This ensures that Particles and MultiMeshes still draw when instance_count is 1
2023-04-11 16:58:42 -07: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
Hugo Locurcio
dd53037f74
Fix typo in FinalAction `switch` statement in RenderingDevice
2023-04-11 18:44:12 +02:00
Pedro J. Estébanez
d4c46f15ae
Allow creation of rendering buffers at any time
2023-04-11 16:33:47 +02:00
bruvzg
83dc545ea2
[Windows] Cleanup COM library initialization/uninitialization.
2023-04-10 10:38:25 +03:00
cody
5062df41a5
Fix "error X3708: continue cannot be used in a switch" in HTML export
2023-04-07 23:16:10 +02:00
Rémi Verschelde
154a29d33a
Merge pull request #74808 from bradc6/feature/AllowCustomOutputShaderGenFilepaths
...
Allow for shaders to be generated outside of the source tree
2023-04-03 16:01:32 +02:00
Rémi Verschelde
253b4875f3
Merge pull request #72859 from clayjohn/VK-suboptimal
...
Recreate swap chain when suboptimal to avoid error spam
2023-04-03 15:57:43 +02:00
Yuri Sizov
fe0949e950
Merge pull request #72361 from the-brickster/master
...
Incorporating the availability of screen and depth textures for the GLES3 backend
2023-03-27 16:24:01 +02: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
bruvzg
09465f3fe6
Remove (or make verbose only) various debug prints.
2023-03-20 08:14:18 +02:00
bruvzg
bed46f723c
[Linux/BSD] Add dynamically loaded library version checks.
2023-03-20 08:10:56 +02:00
Bradley Clemetson
2302c7102f
Allow for external python scripts to call the build python headers via external scripts
...
Change GLES3 to not use a relative path
Make the parameters more explicit and ensure the shaders generated are not using relative paths
2023-03-19 21:18:52 -07:00
bruvzg
ca58a5d56f
Fix Unix temp file creations when using is_backup_save_enabled.
2023-03-18 20:28:30 +02:00
Yuri Sizov
ded38c5d75
Merge pull request #73839 from clayjohn/OUTPUT_IS_SRGB
...
Clean up OUTPUT_IS_SRGB redefinitions
2023-03-16 13:03:37 +01:00
Yuri Sizov
ea31842b72
Merge pull request #73156 from gw2cc/safe_save
...
Create a safe temporary file with is_backup_save_enabled
2023-03-16 12:05:48 +01:00
ACB
345f5757e5
Create a safe temporary file with is_backup_save_enabled
2023-03-15 19:36:07 +01:00
Bastiaan Olij
70dca9ff55
Merge duplicate rd_texture functions
2023-03-10 21:37:01 +11:00
Rémi Verschelde
d150bb84a6
Merge pull request #74566 from clayjohn/GL-canvas-texture
...
Avoid copying CanvasTexture when updating proxy
2023-03-08 08:59:04 +01:00
Rémi Verschelde
23bbf6b37c
Merge pull request #74533 from SlugFiller/fix-clip-no-children
...
Fixes a canvas item set to clip children being drawn as black if no children are visible
2023-03-08 08:57:00 +01:00
Rémi Verschelde
a0ff87f48d
Merge pull request #74416 from SlugFiller/fix-skeleton2d-aabb
...
Fix AABB calculation for meshes using Skeleton2D
2023-03-08 08:56:12 +01:00
clayjohn
84482ef90b
Avoid copying CanvasTexture when updating proxy
2023-03-07 12:48:32 -08:00
SlugFiller
f25508befb
Fixes a canvas item set to clip children being drawn as black if no children are visible
2023-03-07 09:53:26 +02:00
clayjohn
06042a23b6
Avoid overflow when calculating ptr address for 3D textures in RenderingDevice texture update
2023-03-06 15:46:40 -08:00
SlugFiller
06a1fe0364
Fix AABB calculation for meshes using Skeleton2D
2023-03-05 08:21:08 +02:00
clayjohn
46b416f3b1
Add proper default texture filter and repeat modes for Canvas shaders in the OpenGL3 renderer
2023-03-03 10:58:57 -08:00
Rémi Verschelde
ec6e072836
Merge pull request #73966 from the-brickster/GLES3_GL_POINT_FIX
...
Solution for resolving the issue of point size not functioning correctly in GLES3
2023-03-02 11:23:48 +01:00
clayjohn
c69b14e96e
Add warnings for unsupported features in mobile and gl_compatibility backends
2023-02-26 12:28:02 -08:00
LandoUWB
f23f0a27c1
Commit Fix for GLES3 point size not working
2023-02-25 23:39:43 -08:00
clayjohn
316cf04059
Clean up OUTPUT_IS_SRGB redefinitions
2023-02-23 12:56:42 -08:00
Rémi Verschelde
ae21832823
Merge pull request #73622 from ChibiDenDen/patch-2
...
Fix use-after-free for VkAttachmentReference
2023-02-21 21:15:43 +01:00
Rémi Verschelde
5e57205365
Merge pull request #73478 from NewDefectus/master
...
Use the original canvas to calculate light positioning
2023-02-21 21:14:51 +01:00
Alon Ran
2d7db30f0d
Use the original canvas to calculate light positioning
2023-02-21 11:57:16 +02:00
Yuri Rubinsky
94831c7209
Forbid passing multiview sampler to the custom function in shaders
2023-02-21 11:23:17 +03:00
Rémi Verschelde
d68cfb43ef
Merge pull request #73662 from BastiaanOlij/fix_opengl_wobbly_sky
...
Fix wobbly sky in stereoscopic OpenGL
2023-02-21 07:16:21 +01:00
Rémi Verschelde
c71fea4467
Merge pull request #73659 from BastiaanOlij/fix_opengl_clearscreen
...
Fix issue with clearing screen after part has been drawn
2023-02-21 07:16:00 +01:00
Bastiaan Olij
2852c9c319
Fix wobbly sky in stereoscopic OpenGL
2023-02-21 16:11:57 +11:00
Bastiaan Olij
67cb660532
Fix issue with clearing screen after part has been drawn
2023-02-21 14:18:23 +11:00
ChibiDenDen
d104d8447b
Fix use-after-free for VkAttachmentReference
...
In the flow where VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME does not exist
VkAttachmentReference are created inside a loop and their backing buffer is referenced in the subpass object.
the VkAttachmentReference vectors are freed once the loop exists, causing the subpass to point to freed data.
Add all the VkAttachmentReference to a vector in the scope of the entire function, to ensure they are not freed until vkCreateRenderPass is called
2023-02-20 11:54:52 +02:00
ChibiDenDen
aeab31b13a
Fix bufSize parameter for glGetSynciv
...
According to the docs:
https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glGetSynciv.xhtml
Bufsize is in integers, not bytes.
The current code overflows data unto other stack variables.
2023-02-20 11:35:28 +02:00
Rémi Verschelde
37589edf17
Merge pull request #73524 from clayjohn/GL-occluder
...
Avoid unnecessary binding of occlusion polygon vertex array
2023-02-18 16:19:44 +01:00
clayjohn
5bbf5b8e72
Avoid unecessary binding of occlusion polygon vertex array
...
By binding this and unbinding it, the state was getting modified in other parts of the pipeline
2023-02-17 13:11:25 -08:00
LandoUWB
98697b05d8
Incorporating the availability of screen and depth textures for the GLES3 backend
2023-02-16 21:18:58 -08:00
rsjtdrjgfuzkfg
7f8fa79e94
OpenGL: fix culling without depth prepass
...
This commit ensures a known backface culling state when rendering, even
if no depth prepass is used. This fixes backside culling not being
applied properly in some situations, most notably in scenes that only
use backside culling on mobile platforms.
2023-02-17 00:01:36 +01:00
Rémi Verschelde
29f670b7ab
Merge pull request #73359 from bruvzg/so_wrap_opt
...
[Linux] Make SO wrapper usage optional.
2023-02-16 18:35:04 +01:00
bruvzg
dd068794c3
[Linux] Make SO wrapper usage optional.
2023-02-16 16:38:47 +02:00
bruvzg
bc95b0b171
Restore FileAccess.close method.
2023-02-16 15:34:20 +02:00
Rémi Verschelde
aa6ec76317
Merge pull request #73332 from clayjohn/GL-h2f-branch
...
Avoid branch in half2float in gl_compatibility renderer
2023-02-15 22:46:47 +01:00
clayjohn
58bad55d42
Avoid branch in half2float in gl_compatibility renderer
2023-02-14 20:31:36 -08:00
clayjohn
f35ca4a9c7
Properly calculate lifetime_split for particles
2023-02-14 14:37:47 -08:00
clayjohn
081b31d200
Clear Window before blitting Viewport in gl_compatibility renderer
2023-02-14 10:30:02 -08:00
Rémi Verschelde
1a206d0e22
Merge pull request #73263 from clayjohn/render_priority
...
Notify mesh surface when render_priority changes
2023-02-14 11:05:28 +01:00
Rémi Verschelde
1f18e16a32
Merge pull request #73255 from clayjohn/GLES3-batch-blend
...
Store blend mode between CanvasItems to preserve batching
2023-02-14 11:01:44 +01:00
clayjohn
d3b3419aff
Notify mesh surface when render_priority changes
...
This ensures that the mesh properly takes render_priority into account when changed
2023-02-13 18:09:33 -08:00
clayjohn
ab4e79cd03
Store blend mode between CanvasItems to preserve batching
2023-02-13 14:46:26 -08:00
Rémi Verschelde
0668e0f5a9
Merge pull request #69001 from dzil123/fix_rendering_checks
...
Fix various missing rendering parameter checks
2023-02-13 21:07:05 +01:00
Wiktor Kocielski
b66f3846b4
Make present mode info message print only on change
...
Styling fix
2023-02-12 16:08:11 +03:00
sakrel
089dbecef4
Make draw command labels thread safe
2023-02-10 21:27:31 +01:00
Rémi Verschelde
ed85a2c8ce
Merge pull request #70663 from EpEpDragon/feature_buffer_get_data_size_option
...
Add optional size parameter to the RenderDevice buffer_get_data method.
2023-02-10 18:49:28 +01:00
clayjohn
f6d22df072
Properly reset blend mode when resetting canvas in compatibility renderer
2023-02-09 15:50:17 -08:00
Emmanouil Papadeas
c36460060e
Further refactoring to AudioDriver implementations after #69120 .
...
- Rename all instances of `capture_start()` and `capture_end()` to their new
names. Fixes #72892 .
- More internal renames to match what was started in #69120 .
- Use `override` consistently so that such refactoring bugs can be caught.
- Harmonize the order of definition of the overridden virtual methods in each
audio driver.
- Harmonize prototype for `set_output_device` and `set_input_device`.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-02-09 11:02:00 +01:00
JoJoX
a7f3b4459a
Handle 0 exponent in float/half conversion for OpenGl
2023-02-08 20:41:44 +01:00
Rémi Verschelde
1258de0d70
Merge pull request #72858 from clayjohn/VK-swap-buffers-err
...
Add more debug information to swapchain errors in Vulkan context
2023-02-08 09:34:13 +01:00
clayjohn
22291d7ae2
Add more debug information to swapchain errors in Vulkan context
2023-02-07 13:52:36 -08:00
clayjohn
c9d2bc91aa
Recreate swap chain when suboptimal to avoid error spam
2023-02-07 13:43:14 -08:00
clayjohn
76caf3fbae
Set instancing flags when using GPUParticles in OpenGL renderer
2023-02-07 10:45:34 -08:00
clayjohn
56450fb179
Implement cull_mask for decals and lights in mobile and compatibility backends
2023-02-06 12:12:47 -08:00
Yuri Sizov
2bd5302704
Merge pull request #72695 from clayjohn/CanvasGroup-shading
...
Avoid shading CanvasGroup nodes twice
2023-02-04 21:38:25 +03:00
clayjohn
dfbf439081
Avoid shading CanvasGroup nodes twice
2023-02-03 15:40:42 -08:00
Rémi Verschelde
0b1d516f67
Merge pull request #72684 from clayjohn/mm-update
...
Fix MultiMesh visible_instance_count being ignored after the first frame
2023-02-04 00:40:36 +01:00
Rémi Verschelde
a268dcc7e3
Merge pull request #72690 from Calinou/opengl-trim-gpu-name
...
Trim "/PCIe/SSE2" from GPU names when starting the OpenGL renderer
2023-02-04 00:37:28 +01:00
Rémi Verschelde
1253547837
Merge pull request #72681 from clayjohn/GL-multimesh-color
...
Ignore instance color and instance custom_data when not used in the OpenGL renderer
2023-02-04 00:24:39 +01:00
Hugo Locurcio
da81c3f9b5
Trim "/PCIe/SSE2" from GPU names when starting the OpenGL renderer
...
This makes the command line print consistent with the Vulkan renderer.
2023-02-03 23:28:41 +01:00
Ricardo Buring
497f5576c1
Fix MultiMesh visible_instance_count being ignored after the first frame
...
Co-authored-by: Clay John <claynjohn@gmail.com>
2023-02-03 11:40:39 -08:00
clayjohn
bf0cc8f52a
Ignore instance color and instance custom_data when not used in the OpenGL renderer
2023-02-03 10:34:30 -08:00
Hugo Locurcio
f3e8300b50
Print name of Vulkan rendering method on startup
...
This helps troubleshooting as the CLI logs now distinguish between
Forward+ and Forward Mobile.
2023-02-03 13:01:48 +01:00
Rémi Verschelde
ddca070bea
Merge pull request #72631 from rburing/custom_aabb_update_dependency
...
Notify dependencies when setting custom mesh AABB
2023-02-03 06:24:51 +01:00
Rémi Verschelde
ec3adb93f7
Merge pull request #72589 from BastiaanOlij/add_layer_slice_support
...
Add layer slice support to render device and render buffers
2023-02-03 06:24:43 +01:00
Bastiaan Olij
093289364f
Add layer slice support to render device and render buffers
2023-02-03 09:48:56 +11:00
Ricardo Buring
086b9e0c59
Notify dependencies when setting custom mesh AABB
...
Fixes SoftBody3D culling issues.
2023-02-02 23:31:27 +01:00
Ninni Pipping
e241f871a4
Fix texture rect transpose for OpenGL
2023-02-02 13:20:29 +01:00
Rémi Verschelde
ab4d8df163
Merge pull request #72485 from BastiaanOlij/add_eye_matrix_access
...
Expose EYE_OFFSET to gdshader code
2023-02-01 07:33:18 +01:00
Rémi Verschelde
897ee46888
Merge pull request #72227 from dsnopek/openxr-opengl-sky
...
Fix sky rendering with multiview in OpenGL
2023-02-01 07:32:29 +01:00
Rémi Verschelde
92f3725da8
Merge pull request #72474 from clayjohn/GL-leaky-tex
...
Avoid leaking texture->tex_id when clearing render targets
2023-02-01 07:32:05 +01:00
Rémi Verschelde
3eb1ac9fd2
Merge pull request #72075 from Maran23/extents-to-size
...
Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
2023-02-01 07:30:09 +01:00
Bastiaan Olij
8c77aea9ab
Expose EYE_OFFSET to gdshader code
2023-02-01 12:39:13 +11:00
clayjohn
a919c6184e
Avoid leaking texture->tex_id when clearing render targets
2023-01-31 13:39:39 -08:00
Marius Hanl
a59819630d
Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
...
- Extents are replaced by Size (Size is Extents * 2)
- The UI text displays 'Size'
- Snapping is adjusted to work with Size
- _set and _get handle extents for compatibility
Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2023-01-31 20:04:11 +01:00
David Snopek
bd9dfcff3d
Fix sky rendering with multiview in OpenGL
2023-01-31 11:36:14 -06:00
souplamp
5300daaff2
Audio rename (device, capture_device) -> (output_device, input_device)
...
Change instances of audio properties 'device' to 'output_device',
and instances of audio properties 'capture_device' to 'input_device',
as well as their subsequent getter & setter functions.
Update the docs to reflect these changes, as well as the
3-to-4 converter for GDScript and CSharp to make proper
conversions (only exception is 'device' since that name
is too vague and might replace non-AudioServer related
instances, such as user comments and variables).
This does not change internal references to references like
'Render Client' and 'Capture Client' in WASAPI; such is outside the
scope of this commit. This also does not change ALSA's references,
considering that it uses 'device' to mean input and output
interchangeably.
Other references are changed, however where applicable,
to be consistent with the new AudioServer methods and property
names.
2023-01-31 18:25:11 +01:00
Rémi Verschelde
c24e0065b2
Merge pull request #72433 from clayjohn/Pointlight2D-crash
...
Avoid crash when CanvasTexture used with light decal atlas
2023-01-31 10:54:02 +01:00
clayjohn
cfd5fe0f29
Avoid crash when CanvasTexture used with light decal atlas
...
The decal atlas is used for Light2Ds, decals, and Light3Ds
2023-01-30 20:59:53 -08:00
Juan Linietsky
28f51ba547
Refactor high quality texture import
...
* Only two texture import modes for low/high quality now:
* S3TC/BPTC
* ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.
This solves the following problems:
* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
bruvzg
4c50ac3921
[X11] Add support for dead keys without active IME. Fix IME focus and cleanup.
2023-01-30 13:31:48 +02:00
Rémi Verschelde
fca400450c
Merge pull request #72291 from clayjohn/GL-item-cap
...
Remove cap on number of items drawn in frame in 2D gl_compatibility renderer
2023-01-29 14:12:38 +01:00
clayjohn
0b28c1f8ed
Remove cap on number of items drawn in frame in 2D gl_compatibility render
...
Also clean up some names to make the overall organization more clear
Also remove cap on items per batch
2023-01-28 20:36:17 -08:00
clayjohn
eb9c2b878a
Automatically transform Skeleton2D calculations so pivots are not needed
2023-01-27 14:55:22 -08:00
Rémi Verschelde
f0e3c3f4c3
Merge pull request #72168 from RandomShaper/sensible_lock_return
...
Booleanize various sync primitives' wait & locking methods
2023-01-27 15:40:43 +01:00
Pedro J. Estébanez
f630940591
Booleanize various sync primitives' wait & locking methods
2023-01-27 11:15:30 +01:00
Rémi Verschelde
6f7793ce1a
Merge pull request #71581 from clayjohn/dependency-changed
...
Flag dirty dependencies when GeometryInstance dependencies change in renderer
2023-01-26 22:57:32 +01:00
Rémi Verschelde
3cacc83526
Merge pull request #72138 from clayjohn/GL-globals
...
Properly append global uniform buffer name in gl_compatibility shaders
2023-01-26 22:52:42 +01:00
clayjohn
eefddb07bc
Properly append global uniform buffer name in gl_compatibility shaders
...
Also error when using instance uniforms
2023-01-26 12:14:45 -08:00
bruvzg
653799bb38
Fix LCD font AA on OpenGL renderer.
2023-01-26 18:45:18 +02:00
Rémi Verschelde
4b0363312e
Merge pull request #71455 from BastiaanOlij/fix_stereo_screen_depth
...
Make screen texture and depth texture work in Multiview
2023-01-26 01:11:02 +01:00
Bastiaan Olij
85c478e170
Make screen texture and depth texture work in Multiview
2023-01-25 13:35:01 +11:00
Rémi Verschelde
a6042b649a
Merge pull request #71832 from Geometror/fix-spotlight-artifacts
...
Fix some `SpotLight3D` issues (clustering artifacts, leaking light, AABB)
2023-01-24 09:15:26 +01:00
Hendrik Brucker
4bd01a93dc
Fix some SpotLight3D issues (clustering artifacts, light leak)
2023-01-24 01:08:32 +01:00
clayjohn
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
Rémi Verschelde
c309de5399
Merge pull request #71910 from jainl28patel/fix_ReflectionProbe_rendering
...
fix ReflectionProbe rendering extents for (10,10,10)
2023-01-23 20:46:22 +01:00
Rémi Verschelde
591100cbd6
Merge pull request #70429 from BastiaanOlij/check_more_vulkan_extensions
...
Enabling additional vulkan extension and adding further checks
2023-01-23 20:10:19 +01:00
jainl28patel
2da3acf620
fix ReflectionProbe rendering extents for (10,10,10)
2023-01-24 00:32:24 +05:30
bruvzg
5c4fe6339b
[Linux/BSD] Include headers for dynamically loaded libraries to simplify build dependencies.
2023-01-23 16:37:43 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell
2023-01-23 11:02:20 +01:00
bruvzg
1cc5524b81
[iOS] Restore OpenGLES3 renderer support.
2023-01-22 13:59:52 +02:00
kobewi
615c517034
Use range iterators in LocalVector loops
2023-01-21 18:44:42 +01:00
Rémi Verschelde
a58f6a9dd6
Merge pull request #71220 from reduz/prevent-opening-windows-console-files
...
Prevent opening Windows console files
2023-01-21 11:28:31 +01:00
Rémi Verschelde
23d8d44535
Merge pull request #71776 from clayjohn/PointLight2D-indices
...
Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
2023-01-21 10:28:50 +01:00
clayjohn
d3c3fa32af
Stop incrementing light_count once max number of lights are reached in 2D canvas renderer
2023-01-20 17:04:00 -08:00
Rémi Verschelde
4db3716d8d
Merge pull request #71772 from clayjohn/GLES3-li
...
Assign light indices after sorting in OpenGL renderer
2023-01-21 01:43:08 +01:00
clayjohn
6d0af4fcd8
Assign light indices after sorting in OpenGL renderer
...
This ensures that the light indices sent to the shader actually match where the light is saved
2023-01-20 15:41:20 -08:00
clayjohn
49bebf2bfb
Sort decals and lights based on camera origin
...
Also implement sort_offset for decals
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-01-20 09:58:17 -08:00
clayjohn
faea9f5c10
Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
...
in favour of texture hints
2023-01-18 19:52:47 -08:00
Rémi Verschelde
6da836bbb4
Merge pull request #71514 from akien-mga/os-unset_environment
...
OS: Add `unset_environment`, better validate input
2023-01-18 08:35:43 +01:00
clayjohn
c4a8284dec
Flag dirty dependencies when GeometryInstance dependencies change in renderer
...
Normally dependencies are only set dirty when changed during culling, but that misses changes that happen in the renderer (like a new shader being set in a material)
2023-01-17 12:39:13 -08:00
clayjohn
eace1276a5
Decompress RA_AS_RG formats on Web platform in GLES3 renderer and disable texture swizzling
...
While using compressed formats is allowed, the RA_AS_RG formats need texture swizzling which is not available on web
2023-01-17 10:48:04 -08:00
Rémi Verschelde
226daf9b59
GLES3: Fix canvas shader use of undefined draw_data
...
Fixes #71551 .
2023-01-17 13:17:53 +01:00
Rémi Verschelde
59dcf64dd6
Merge pull request #71382 from jainl28patel/sprite2d_flip_normal_map
...
fix normal map not flipping in sprite2D
2023-01-17 10:56:44 +01:00
Rémi Verschelde
91a54cdbc1
Linux/BSD: Add LINUXBSD_ENABLED define for non X11-related checks
2023-01-16 17:01:35 +01:00
Rémi Verschelde
818a9e99a4
OS: Add `unset_environment`, better validate input
...
Instead of returning an undocumented boolean error code, we do the
validation checks that should ensure a successful result.
Based on:
- https://linux.die.net/man/3/setenv
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
2023-01-16 16:39:44 +01:00
Bastiaan Olij
318656d326
Enabling additional vulkan extension and adding further checks
2023-01-15 14:49:15 +11:00
Rémi Verschelde
ac104a69b8
Merge pull request #71309 from BastiaanOlij/improve_renderscaling_options
...
Improving communication of scaling settings to renderer implementation
2023-01-14 14:45:02 +01:00
jainl28patel
390f83bf5a
fix normal map not flipping in sprite2D
2023-01-14 11:51:56 +05:30
Yuri Rubinsky
01cddbb12a
Clear material arrays to prevent freeing of invalid texture RID
2023-01-13 23:25:09 +03:00
Bastiaan Olij
478c37deb8
Improving communication of scaling settings to renderer implementation
2023-01-13 12:54:15 +11:00
Rémi Verschelde
886f7f8290
Merge pull request #71248 from rsjtdrjgfuzkfg/opengl-texture-format
...
OpenGL: Support FORMAT_{ETC2,DXT5}_RA_AS_RG
2023-01-12 21:11:44 +01:00
Rémi Verschelde
0e4e782ada
Merge pull request #70714 from Calinou/doc-os-stdin
...
Improve documentation for `OS.read_string_from_stdin()`
2023-01-12 09:24:47 +01:00
rsjtdrjgfuzkfg
ebe1123532
OpenGL: Support FORMAT_{ETC2,DXT5}_RA_AS_RG
...
This commit adds support for FORMAT_EXT2_RA_AS_RG and
FORMAT_DXT5_RA_AS_RG with OpenGL, fixing VRAM compression with the
normal map option enabled.
2023-01-11 22:58:11 +01:00
Hugo Locurcio
86b8176864
Improve documentation for `OS.read_string_from_stdin()`
...
This makes it clearer that calls to this method are blocking.
The unused method parameter was also removed.
2023-01-11 19:57:25 +01:00
Juan Linietsky
c5390f203d
Prevent opening Windows console files
...
Fixes #20110 .
2023-01-11 15:05:29 +01:00
Pedro J. Estébanez
5ca2ba45f1
Make inclusion of Godot version in shader hash universal
2023-01-09 17:47:02 +01:00
clayjohn
f78b492682
Properly map shader language texture hints to sampler hints in GLES3 renderer
2023-01-06 15:52:12 -08:00
EpEpDragon
36d02882b9
Added optional offset and size parameter to RenderDevice buffer_get_data method
2023-01-06 17:08:37 +02:00
Rémi Verschelde
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
clayjohn
062fb8b0dc
Ignore depth draw optimization when using depth draw alpha prepass
...
This is necessary as the scene shader still uses alpha in this case so we can't discard fragments that weren't written to the depth buffer
2023-01-03 12:33:07 -08:00
Rémi Verschelde
f064898956
Merge pull request #70253 from BastiaanOlij/cleanup_sky_render
...
Cleanup and improve sky render
2022-12-23 23:44:02 +01:00
Rémi Verschelde
1cab6c91e9
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
...
Added options for sorting transparent objects (port of PR #63040 )
2022-12-23 09:47:24 +01:00
Bastiaan Olij
e886a7af81
Cleanup and improve sky render
2022-12-23 19:45:19 +11:00
Bastiaan Olij
6f4f38db07
Added options for sorting transparent objects (port of PR 63040)
2022-12-23 19:30:33 +11:00
bruvzg
3d8a942a56
Fix reading Unicode from stdio.
2022-12-21 09:07:59 +02:00
Rémi Verschelde
f318d60e06
Merge pull request #65376 from reduz/astc-support
...
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Juan Linietsky
71d21c7ccb
Implement basic ASTC support
...
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.
The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.
ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.
Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Rémi Verschelde
2b056115ef
Merge pull request #70091 from clayjohn/bone-aabbs
...
Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain
2022-12-17 12:32:32 +01:00
Rémi Verschelde
676f60b0cc
Merge pull request #70132 from clayjohn/RT-update
...
Implement render_target_was_used API so that Viewports can properly check if they have been used.
2022-12-17 12:26:51 +01:00
Rémi Verschelde
376290ea86
Merge pull request #70163 from clayjohn/particles-sdf
...
Transform sdf xfrom by particle emission transform when particles are in global space
2022-12-17 12:24:51 +01:00
Rémi Verschelde
3b6d697676
Merge pull request #70133 from lyuma/negative_scale_backface
...
Flip culling when rendering a camera with negative scale
2022-12-17 12:22:18 +01:00
Rémi Verschelde
13593d8644
Merge pull request #70087 from clayjohn/mesh-aabb
...
Cache mesh AABB when modified by skeleton and update instance AABB when skeleton changes
2022-12-17 12:21:01 +01:00
clayjohn
d7ffcd20f2
Implement boot image in OpenGL3 renderer
2022-12-16 13:27:33 -08:00
clayjohn
99a159cd9b
Transform sdf xfrom by particle emission transform when particles are in global space
2022-12-16 11:55:11 -08:00
clayjohn
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
Lyuma
80dea918c4
Flip culling when rendering a camera with negative scale
2022-12-15 16:12:10 -08:00
Rémi Verschelde
47ef0549ee
Merge pull request #70065 from clayjohn/GLES3-attribs
...
Use instanced array buffer instead of UBO for canvas item batching
2022-12-15 18:45:07 +01:00
Yuri Rubinsky
5c83e95103
Merge pull request #70016 from Chaosus/refactor_rd_shader_data
...
fixed https://github.com/godotengine/godot/issues/69949
2022-12-15 20:28:26 +03:00
clayjohn
b6a1aa15b1
Use instanced array buffer instead of UBO for canvas item batching
...
This simplifies the generated shader code which increases both performance and compile time on low end devices
2022-12-15 08:25:44 -08:00
Clay John
aa8a899f52
Merge pull request #70104 from RandomShaper/vk_dev_asserts
...
Replace certain sanity checks with proper dev-only assertions in Vulkan RD
2022-12-15 08:22:17 -08:00
Yuri Rubinsky
d99ea32999
Merge pull request #70102 from Chaosus/rd_remove_usage_indirect
2022-12-15 16:22:19 +03:00
Pedro J. Estébanez
af6189711e
Replace certain sanity checks with proper dev-only assertions in Vulkan RD
2022-12-15 12:34:08 +01:00
Rémi Verschelde
346efd29e0
Fix typos with codespell
2022-12-15 12:24:08 +01:00
Yuri Rubinsky
807632a90c
Changed `STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT` type to enum flags
2022-12-15 14:10:37 +03:00
Rémi Verschelde
762c6d4b36
Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
...
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-15 09:21:35 +01:00
Yuri Rubinsky
56954485ed
Refactor `ShaderData` & fix the sorting of shader uniforms
2022-12-15 10:02:59 +03:00
clayjohn
ef246d9156
Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain
2022-12-14 19:32:19 -08:00
clayjohn
b7088bbf52
Cache mesh AABB when modified by skeleton and update instance AABB when
...
skeleton changes
2022-12-14 18:07:07 -08:00
Rémi Verschelde
465d4c1d95
Merge pull request #70009 from clayjohn/glow-hq
...
Remove high quality glow as it is not any higher quality than regular glow
2022-12-13 23:32:15 +01:00
clayjohn
bdd4001ef0
Various fixes and documentation for CanvasGroup
...
Properly apply custom materials with CanvasGroups in the GLES3 backend
Properly blur backbuffer when using a partial rect in forward_plus and
gl_compatibility renderers
Properly set fit_margin when clear_margin is set
Fix shader error during backbuffer clear in mobile renderer
2022-12-13 10:22:18 -08:00
clayjohn
5b5cd2b98b
Remove high quality glow as it is not any higher quality than regular glow
2022-12-13 10:15:45 -08:00
Pedro J. Estébanez
14e301467e
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-12 14:14:53 +01:00
Pedro J. Estébanez
c985ee985f
Tidy up some aspects of Vulkan RD
2022-12-12 14:14:53 +01:00
Rémi Verschelde
f79c034713
Merge pull request #69635 from BastiaanOlij/fix_get_buffer
...
Fix barrier on buffer_get_data
2022-12-12 11:44:29 +01:00
Rémi Verschelde
f1edd03d4c
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
...
Rename all gdnative occurences to gdextension
2022-12-12 11:43:59 +01:00
Gilles Roudière
be1c9d677d
Rename all gdnative occurences to gdextension
...
Non-exhaustive list of case-sensitive renames:
GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
Rémi Verschelde
97df6de4a7
Merge pull request #69901 from akien-mga/gles3-fix-scene-shader-omni-spot
...
OpenGL: Fix scene shader error when using Omni or Spot but not both
2022-12-12 08:27:41 +01:00
Yuri Rubinsky
6e48db69a3
Changed `RD::PipelineDynamicStateFlags` type to enum flags
2022-12-11 15:37:35 +03:00
Rémi Verschelde
4454498d1e
OpenGL: Fix scene shader error when using Omni or Spot but not both
...
Fixes #69886 .
2022-12-11 10:39:39 +01:00
Malcolm Nixon
deb2adf4bd
Invalidate the previous index array after calling glBindVertexArray, as this call clears the GL_ELEMEMT_ARRAY_BUFFER when changing the state.
...
Update rasterizer_scene_gles3.cpp
Fix white-space to match godotengine checks.
2022-12-10 10:28:17 -05:00
Rémi Verschelde
60d7525d84
Merge pull request #69735 from clayjohn/Particles2D-sdf
...
Detect and report if 2D particles use the screen SDF
2022-12-08 09:52:01 +01:00
Rémi Verschelde
cf093f8e47
Merge pull request #69733 from clayjohn/GLES3-skeleton-leak
...
Properly free Skeleton RID in RenderingServer.free()
2022-12-07 22:23:40 +01:00
clayjohn
0a88c68d0a
Detect and report if 2D particles use the screen SDF
...
This ensures that the SDF is updated even if not used in a canvas_item shader
2022-12-07 10:03:08 -08:00
clayjohn
1aa61a877a
Properly free Skeleton RID in RenderingServer.free()
2022-12-07 09:35:13 -08:00
Rémi Verschelde
6717c4cad2
Merge pull request #69322 from BastiaanOlij/fix_vulkan_versions
...
Fix issue around incorrect Vulkan version
2022-12-06 16:11:10 +01:00
Rémi Verschelde
bd290ad566
Merge pull request #69636 from Malcolmnixon/vulkan-mobile-sky-matrix
...
Fix mobile renderer sky_transform operations
2022-12-06 15:16:20 +01:00
Malcolm Nixon
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
Bastiaan Olij
d79f692cae
Fix barrier on buffer_get_data
2022-12-06 22:44:35 +11:00
Rémi Verschelde
43e9ca40ff
Merge pull request #65035 from nathanfranke/fix-aabb-mesh
...
Fix AABB errors on meshes with bones on multiple surfaces
2022-12-06 12:26:03 +01:00
Rémi Verschelde
8ec9701ad0
Merge pull request #69634 from clayjohn/GLES3-spec
...
Clean up specialization constants in OpenGL scene renderer
2022-12-06 11:00:28 +01:00
Rémi Verschelde
d321bae91e
Merge pull request #69633 from clayjohn/GLES3-textures
...
Use internal texture name when setting texture uniform location in OpenGL renderer
2022-12-06 11:00:23 +01:00
Rémi Verschelde
09a128761a
Merge pull request #69581 from dsnopek/openxr-opengl-flip-screen
...
[opengl] Don't flip render target when blitting it to screen if it wasn't rendered upside down
2022-12-06 10:47:05 +01:00
clayjohn
975a8f9ada
Clean up specialization constants in OpenGL scene renderer
...
Also add support for disabling omni and spot lights when not used
2022-12-05 18:10:13 -08:00
clayjohn
ac6b25f33e
Use internal texture name when setting texture uniform location in OpenGL renderer
2022-12-05 18:01:24 -08:00
Rémi Verschelde
0697d6f8cd
Merge pull request #69521 from clayjohn/GLES3-glsl
...
Expose emulated *Unorm4x8 glsl functions in non-android builds
2022-12-05 10:13:38 +01:00
Bastiaan Olij
2562c06032
Fix issue where we should be using device supported version instead of instance version for Vulkan
2022-12-05 10:12:07 +11:00
clayjohn
7bc11b5fe8
Exposure emulated *Unorm4x8 glsl functions in non-android builds
...
Originally these functions were exposed on all GLSL ES 300 devices. However, that causes a build error as Android devices expose the *Unorm4x8 functions despite them not being in the ES 300 spec
2022-12-04 14:05:14 -08:00
Nathan Franke
aef261aa2a
fix aabb errors on meshes with bones on multiple surfaces
2022-12-04 14:40:19 -06:00
David Snopek
5af751bfb7
[opengl] Don't flip render target when blitting it to screen if it wasn't rendered upside down
2022-12-04 14:09:52 -06:00
NumbuhFour
1b09fd5410
Implement CAMERA_VISIBLE_LAYERS as built-in shader variable
2022-12-03 22:41:27 -08:00
Rémi Verschelde
daf168f4c8
Merge pull request #69522 from clayjohn/IBL-black-metal
...
Allow black metallic materials to reflect IBL
2022-12-03 12:46:30 +01:00
Rémi Verschelde
29ddbfa19a
Merge pull request #69514 from clayjohn/IBL-roughness
...
Properly remap roughness when reading from radiance map
2022-12-03 12:46:25 +01:00
clayjohn
1e05dd3504
Allow black metallic materials to reflect IBL
2022-12-02 19:54:59 -08:00
clayjohn
b2b89d7294
Properly remap roughness when reading from radiance map
...
This ensures that we consistently use perceptual roughness which matches the behaviour of most other PBR renderers like Blender, Ue4 and Godot 3
2022-12-02 15:39:20 -08:00
Rémi Verschelde
7ef9947d0e
Merge pull request #68870 from dsnopek/master-webxr-input
...
Get WebXR fully working in Godot 4!
2022-12-02 12:24:40 +01:00
David Snopek
310bf39cd3
Get WebXR fully working in Godot 4!
2022-12-01 21:46:30 -06:00
Rémi Verschelde
8177e5d7de
Merge pull request #69325 from clayjohn/GLES3-skeletons
...
Add Skeletons and Blend Shapes to the OpenGL renderer
2022-12-01 23:22:42 +01:00
clayjohn
9141984e7e
Enable GLES3 on Android
...
Add necessary build flags and switch from using a
GLES2 context to a GLES3 one.
This also enables building for OpenXR
Co-authored-by: m4gr3d <fhuyakou@gmail.com>
Co-authored-by: dsnopek <dsnopek@gmail.com>
2022-11-29 14:18:24 -08:00
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
dzil123
b4437cbaa6
Fix various missing rendering parameter checks
2022-11-22 03:48:32 -08: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
Rémi Verschelde
6c58327c69
Merge pull request #66965 from bruvzg/win_llvm
...
[Windows] Fix LLVM MinGW build.
2022-10-06 08:57:29 +02:00
Rémi Verschelde
c2c9a582da
Merge pull request #64815 from RandomShaper/default_cpu_count
...
Improve default `OS`'s CPU count getter
2022-10-06 08:55:51 +02:00
bruvzg
6afb2d0225
[Windows] Fix LLVM MinGW build.
2022-10-06 09:30:25 +03:00
Pedro J. Estébanez
6bf02c0162
Keep a single, portable implementation of `OS::get_processor_count()`
2022-10-05 20:10:47 +02:00
Rémi Verschelde
5b6ccf2fd2
Merge pull request #66720 from qarmin/unintialized_memory
...
Remove usage of unitialized variables
2022-10-05 11:42:47 +02:00
Rémi Verschelde
33f4c5282f
Merge pull request #64819 from RandomShaper/enhance_thread_funcs
...
Enhance portability of threading
2022-10-05 11:42:35 +02:00
Rémi Verschelde
3a2b0ab73d
Merge pull request #66898 from aaronfranke/proj-mat-columns
...
Rename Projection `matrix` to `columns`
2022-10-05 08:35:26 +02:00
Bastiaan Olij
c7656978ba
Adding getters to RenderTarget and implementing override functionality for XR
2022-10-05 11:37:49 +11:00
Aaron Franke
2cea42cc7f
Rename Projection `matrix` to `columns`
2022-10-04 12:34:19 -05:00
Rémi Verschelde
8a47cdc933
Vulkan: Initialize VK_EXT_debug_utils only for dev build or verbose mode
...
End users would get spammed with messages of varying verbosity due to the
mess that thirdparty layers/extensions and drivers seem to leave in their
wake, making the Windows registry a bottomless pit of broken layer JSON.
I'm all for helping end users clean up mess in their registry / system paths
for Vulkan ICDs, layers and extensions, but the way this is done by
VK_EXT_debug_utils is just horrible - and the way for them to fix it (manual
edit of system files) is also not a good thing to recommend.
Closes countless issues where users think Godot is broken because it reports
weird errors.
2022-10-04 16:09:11 +02:00
Pedro J. Estébanez
958ecf55fe
Enhance portability of threading
2022-10-04 11:43:28 +02:00
Rémi Verschelde
bff9fcfc1c
Merge pull request #65822 from BastiaanOlij/more_reorg_20220915
...
Move cluster builder, sdfgi and gi structures to clustered renderer, and more
2022-10-04 11:20:13 +02:00
Rémi Verschelde
11d49dcc0a
Merge pull request #66858 from clayjohn/GLES3-pix-size
...
Properly expose TEXTURE_PIXEL_SIZE in Opengl3 renderer
2022-10-04 10:33:17 +02:00
Rémi Verschelde
9928cdc2e7
Merge pull request #66807 from akien-mga/core-unix-remove-NO_FCNTL-and-NO_STATVFS
...
Unix: Remove now unnecessary I/O defines, cleanup
2022-10-04 10:22:29 +02:00
clayjohn
c8f0f27a0b
Properly expose TEXTURE_PIXEL_SIZE in Opengl3 renderer
2022-10-03 19:13:17 -07:00
Bastiaan Olij
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
Rémi Verschelde
f501e4f665
Unix: Remove now unnecessary I/O defines, cleanup
...
- `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_.
- `NO_NETWORK` is also never defined. It probably isn't enough anyway to
disable network APIs in the current codebase.
- `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some
other platforms, clarify that.
- `NO_STATVFS` can be removed as Android supports it since API level 19,
which is our current min SDK level. It's also only used for
`DirAccessUnix::get_space_left()` which is anyway overridden by
`DirAccessJAndroid::get_space_left()` so it shouldn't make a difference.
* Fixed documentation for `DirAccess.get_space_left()`.
- `NO_FCNTL` is likely also a remnant of early Android days, in current NDK
r23 it seems to be available. Also cleaned up unused `fcntl.h` includes.
- `NO_ALLOCA` is never defined, and we use alloca in many places now.
2022-10-03 12:33:41 +02:00
Rémi Verschelde
54418ea659
Remove NO_THREADS fallback code, Godot 4 requires thread support
...
This also removes `OS::can_use_threads` from the public API since it's always
true.
2022-10-03 11:23:26 +02:00
Rafał Mikrut
2233624152
Remove usage of unitialized variables
2022-10-01 21:09:22 +02:00
Rémi Verschelde
28154b9a07
Merge pull request #66660 from Sauermann/fix-never-happening-error-condition
...
Remove ERR_FAIL_COND that never happens in _draw_sky
2022-09-30 17:44:26 +02:00
Rémi Verschelde
166df0896c
Fix typos with codespell
...
Using codespell 2.3-dev from current git.
And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
Markus Sauermann
7e9327350c
Remove ERR_FAIL_COND that never happens in _draw_sky
...
In the conditional `sky` is always true.
2022-09-30 12:42:50 +02:00
Rémi Verschelde
fe40c52be8
Merge pull request #66638 from timothyqiu/rendering-null
...
Add various null checks in RenderingServer
2022-09-30 09:58:58 +02:00
Rémi Verschelde
7a0500d9a3
Merge pull request #66626 from danboo/fix-typo-run-debug-collisons
...
Fix typos - "collison" -> "collision"
2022-09-30 09:58:25 +02:00
Haoyu Qiu
ffdac72eaa
Add various null checks in RenderingServer
2022-09-30 10:18:14 +08:00
danboo
eba8be6e45
Fix typo - "collison" -> "collision"
2022-09-29 13:56:26 -08:00
Rémi Verschelde
6991e9b43d
Merge pull request #66583 from bruvzg/constexpr
...
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
2022-09-29 10:44:22 +02:00
Rémi Verschelde
315a71103e
Merge pull request #66565 from clayjohn/canvas-lights
...
Clean up canvas light shader API.
2022-09-29 10:43:42 +02:00
bruvzg
ea1848ce0a
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
2022-09-29 10:38:21 +03:00
clayjohn
1a0890122f
Clean up canvas light shader API.
...
Expose LIGHT_ENERGY and LIGHT_IS_DIRECTIONAL.
Add LIGHT_DIRECTION
2022-09-28 11:46:58 -07:00
Rémi Verschelde
85fe6ecc32
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 17:05:34 +02:00
nikitalita
0d3d5ac769
Fix DirAccessWindows::make_dir() choking on ".."
...
`CreateDirectoryW()` chokes on absolute paths that contain `..`
example: "C:\\workspace\\..\\games\\assets"
Simplifying the path before creating the dir fixes this.
2022-09-26 12:24:02 -07:00
Rémi Verschelde
26e9145c26
SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` defines
...
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
outside thirdparty code, which we usually don't intend to debug, so it
seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
and `release_debug` targets. This used to be set for `release` for all
platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
code, which was only implemented for Unix anyway, should have been
`DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
target as we don't want OIDN and Embree asserting all over the place.
2022-09-23 15:21:26 +02:00
Micky
c1b5b68eee
Rename remaining "*_enable" to "*_enabled"
...
Material.`proximity_fade_enable` -> `proximity_fade_enabled`
Material.`set_proximity_fade` -> `set_proximity_fade_enabled`
(Material.`is_proximity_fade_enabled` is unchanged)
Area3D.`reverb_bus_enable` -> `reverb_bus_enabled`
(`set_use_reverb_bus` & `is_using_reverb_bus` are unchanged)
RDPipelineRasterizationState:
`depth_bias_enable` -> `depth_bias_enabled`
`set_depth_bias_enable` -> `set_depth_bias_enabled`
`get_depth_bias_enable` -> `get_depth_bias_enabled`
Bonus:
Area3D.`set_reverb_bus` -> `set_reverb_bus_name`
Area3D.`get_reverb_bus` -> `set_get_reverb_bus_name`
2022-09-21 22:47:46 +02:00
Rémi Verschelde
a23ba42f98
Merge pull request #63594 from Faless/img/4.x_loader_ext
...
[Core] Make ImageFormatLoader extensible.
2022-09-20 15:36:32 +02:00
Rémi Verschelde
7da532275b
Merge pull request #65541 from clayjohn/renderer-setting
...
Split rendering driver project setting into renderer_name and rendering_driver
2022-09-20 09:43:59 +02:00
Fabio Alessandrelli
e8fc6bfeb5
[Core] Make ImageFormatLoader extensible.
2022-09-20 02:01:57 +02:00
Logan Lang
e61d8b6f53
enabled ambient_light_disabled render mode flag
2022-09-19 17:12:32 -05:00
Rémi Verschelde
effddbcf12
Merge pull request #66065 from kidinashell/issue-59488
...
SpotLight3D's and OmniLight3D's Projector doesn't work
2022-09-19 22:02:17 +02:00
clayjohn
4a1c7de57c
Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).
2022-09-19 10:26:10 -07:00
Tobias Widner
422bacbfd1
Fix Vulkan: SpotLight3D's and OmniLight3D's Projector doesn't work
2022-09-19 17:18:45 +02:00
kobewi
9f2dc68279
Replace File/Directory with FileAccess/DirAccess
2022-09-19 11:03:31 +02:00
Rémi Verschelde
55bed82b05
Merge pull request #65525 from MJacred/os/distribution
...
Add get_distribution_name() and get_version() to OS
2022-09-16 13:18:32 +02:00
Rémi Verschelde
bda63e1b5a
Merge pull request #65833 from JFonS/taa_fix_particles_errors
...
Fix error spam in the renderer when using GPUParticles3D
2022-09-16 11:59:00 +02:00
MJacred
ac9786c525
Add get_distribution_name() and get_version() to OS
...
supports: LinuxBSD, Windows, macOS, iOS, Android, UWP
Co-authored-by: bruvzg
2022-09-16 11:17:36 +02:00
JFonS
b668268772
Fix error spam in the renderer when using GPUParticles3D
...
The flag INSTANCE_DATA_FLAG_MULTIMESH is used for both multimesh and particles instances, this commit adds a new INSTANCE_DATA_FLAG_PARTICLES flag to discriminate between them.
This flag will also be used in the future to properly support TAA in particles.
2022-09-16 09:44:22 +02:00
Rémi Verschelde
848668ed45
Merge pull request #65794 from Geometror/fix-canvas-backbuffer
...
Fix/restore BackBufferCopy
2022-09-16 09:20:04 +02:00
Hendrik Brucker
e235bca995
Fix/restore BackBufferCopy
2022-09-15 02:36:39 +02:00
Rémi Verschelde
0ef17b341d
Merge pull request #65796 from clayjohn/GLES3-canvas-shader
2022-09-14 22:38:08 +02:00
clayjohn
9239c61aa6
Fix canvasitem shader builtins when using GLES3
...
Remove prefix canvas_data. as it isn't used in the internal canvasitem shader
2022-09-14 12:41:08 -07:00
clayjohn
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
Rémi Verschelde
2e6ba5ff13
Merge pull request #65746 from clayjohn/GLES3-mem-leak
...
Fix leaking of Mesh version and lod memory when freeing mesh in GLES3
2022-09-13 23:56:53 +02:00
clayjohn
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
clayjohn
9f708489fa
Fix leaking of Mesh version and lod memory when freeing mesh in GLES3
2022-09-13 08:19:14 -07:00
Rémi Verschelde
ff824b6f9d
Merge pull request #65509 from gotnospirit/master-os-get_datetime
...
get_datetime_* functions can return wrong values
2022-09-13 11:01:12 +02:00
clayjohn
96b7cb66df
Fix multiwindow support in GLES3 for X11, Windows, and MacOS.
...
Instead of updating all viewports, then blitting all viewports
to the backbuffer, then swapping all buffers, we run through
all viewports and render, blit, and swap backbuffer before
going to the next viewport.
2022-09-12 17:30:50 -07:00
Rémi Verschelde
79b21e96ad
Merge pull request #65544 from clayjohn/lambert-wrap
...
Apply energy conservation to LAMBERT_WRAP diffuse mode by dividing by PI
2022-09-12 20:42:27 +02:00
clayjohn
97be1fb7b6
Apply energy conservation to LAMBERT_WRAP and TOON diffuse modes by dividing by PI
2022-09-12 08:45:40 -07:00
clayjohn
05f351b215
Use proper color type for transparent render targets in GLES3
2022-09-12 08:19:03 -07:00
James
0aecfc9254
Fixes #65377 : get_datetime_* functions can return wrong values
2022-09-10 07:58:38 +08:00
Rémi Verschelde
337e4d185a
Merge pull request #65016 from timothyqiu/skin-data
...
Fix crash when executing `TubeTrailMesh.get_faces()` with GLES3
2022-09-07 22:17:55 +02:00
Haoyu Qiu
d1aed76a20
Fix crash when executing `SubViewport.set_size_2d_override_stretch`
2022-09-07 22:02:21 +08:00