Commit Graph

3816 Commits

Author SHA1 Message Date
Yuri Sizov 7ae0fa1083 Merge pull request #77496 from clayjohn/GLES3-shadows
Implement 3D shadows in the GL Compatibility renderer
2023-09-28 20:03:53 +02:00
clayjohn cb7200b028 Implement 3D shadows in the GL Compatibility renderer 2023-09-28 09:39:26 +02:00
SlugFiller d468582ef8 Fix build on MSVC 2017 2023-09-27 19:49:59 +03:00
bitsawer 898d1a2d5f Fix errors when freeing GPUParticles 2023-09-27 11:46:31 +03:00
Pedro J. Estébanez a67559931b [GLES3] Avoid freeing proxy textures clearing onwer's data 2023-09-27 10:44:56 +02:00
A Thousand Ships 517e9f8aef [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-26 16:44:52 +02:00
Rémi Verschelde 36945dad07
Merge pull request #82359 from bitsawer/add_gles3_device_cache_key
Add device info to GLES3 shader cache key hash
2023-09-26 16:36:57 +02:00
Rémi Verschelde a4bca12336
Merge pull request #82304 from akien-mga/windows-remove-redundant-MSVC-define
Windows: Remove `MSVC` define redundant with `_MSC_VER`
2023-09-26 13:45:26 +02:00
Rémi Verschelde 48bee5c8ef
Merge pull request #82221 from Riteo/linux-ogl-no-vsync-override
Linux/OpenGL: Don't force vsync in the editor
2023-09-26 13:45:12 +02:00
bitsawer f1062f25eb Add device info to GLES3 shader cache key hash 2023-09-26 13:01:31 +03:00
Rémi Verschelde 814ab59c37
Windows: Remove `MSVC` define redundant with `_MSC_VER`
Cleanup unused MSVC code in FileAccessUnix.
2023-09-26 11:11:45 +02:00
Dario 057367bf4f Add FidelityFX Super Resolution 2.2 (FSR 2.2.1) support.
Introduces support for FSR2 as a new upscaler option available from the project settings. Also introduces an specific render list for surfaces that require motion and the ability to derive motion vectors from depth buffer and camera motion.
2023-09-25 10:37:47 -03:00
Matias N. Goldberg d5f913ce1d Opt-in to Vulkan features we actually use. 2023-09-24 21:05:48 -03:00
Riteo 4fd6777cf4 Linux/OpenGL: don't force vsync in the editor
I couldn't tell whether this has an actual purpose and it feels more
like a debug remnant.

We also need to be able to disable vsync in the editor for the WIP
Wayland backend (in the EGL driver) as it does manual frame throttling.
2023-09-24 04:36:58 +02:00
Shawn Wallace b12ed82c04 Expose texture_create_from_extension to GDExtension 2023-09-23 16:57:12 -04:00
bruvzg 1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
Pedro J. Estébanez bda6fc5d2f Polish a few things in Vulkan RD 2023-09-19 18:10:46 +02:00
Rémi Verschelde 9a1b4f338b
Merge pull request #81160 from paddy-exe/canvas-uv-world-space
Add render mode to use world coordinates in canvas item shader
2023-09-19 09:03:18 +02:00
Matias N. Goldberg cfeccc2146 Fix validation error when using pipeline cache control
PR #80296 introduced a regression because it checks if the
VK_EXT_pipeline_creation_cache_control extension has been enabled before
using it, but turns out the process is a bit more convoluted than that
(a Vulkan driver may support the extension but then say the feature is
not supported)
2023-09-16 18:59:04 -03:00
Yuri Sizov 48e1c19dea Merge pull request #81583 from AThousandShips/null_check_drivers_platform
[Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-09-15 19:48:18 +02:00
bitsawer af7b870e2a Improve GLES3 scene renderer compatibility with older devices 2023-09-14 16:34:29 +03:00
A Thousand Ships 3565d1bf7e [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-12 20:13:32 +02:00
Rémi Verschelde 3815b2f98e
Merge pull request #81315 from conorlawton/z-billboard-y-velocity-no-scale
Fix z-billboard + y to velocity transform alignment to correctly respect non-uniform scale
2023-09-08 23:14:27 +02:00
Conor Lawton 9ecafcc491 Fixed z-billboard-y-velocity to correctly respect non-uniform scale instead of averaging scale 2023-09-08 20:01:57 +01:00
Rémi Verschelde cfd292939c
Haiku: Remove remnants of past WIP platform port
The Haiku platform port was never finalized, and moved to a separate repo in
Godot 3.2 days: https://github.com/godotengine/godot-platform-haiku

Sadly it didn't garner more interest there and is bitrotting. It was never
ported to Godot 4 so the bits of Haiku support left in Mono aren't useful.
2023-09-07 16:37:51 +02:00
Rémi Verschelde 8de6405288
UWP: Remove platform port, needs to be redone from scratch for 4.x
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.

So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
2023-09-07 15:01:59 +02:00
Rémi Verschelde 8f3042ed46
Merge pull request #81395 from jsjtxietian/fix-clear-color-alpha-value-affect-2d-editor-in-compatibility
Fix clear color's alpha value will affects 2D editor in Compatibility mode
2023-09-07 13:54:10 +02:00
jsjtxietian e21a485dbc Fix clear color's alpha value will affects 2D editor in Compatibility mode
When the rt's transparency is false, force the alpha of the clear color to one
2023-09-07 12:56:34 +08:00
Milan Gruner 45a33cc749 Implement render mode fog_disabled and BaseMaterial3D setting Disable Fog 2023-09-05 18:15:02 +02:00
Rémi Verschelde 497ca8c433
Merge pull request #80296 from RandomShaper/overhaul_vk_pso_cache
Enhance Vulkan PSO caching
2023-09-03 00:20:40 +02:00
bitsawer 836705d7a9 Reset SDFGI when changing editor scene tabs 2023-08-30 19:50:05 +03:00
Patrick c98ab5aba3 Add option to use world coordinates in canvas item shader
By using the render mode `world_vertex_coords` you can automatically use the vertex coordinates in world space
2023-08-30 15:32:18 +02:00
Rémi Verschelde 56b13b6865
Merge pull request #81001 from RandomShaper/win_safe_save
Make Windows' safe save more resilient
2023-08-30 12:16:06 +02:00
Pedro J. Estébanez bcf33cfbd1 Enhance Vulkan PSO caching 2023-08-30 12:00:54 +02:00
Rémi Verschelde 9be010cde4
Merge pull request #81059 from darksylinc/matias-vk-barrier-early_fragment_depth
Fix missing `EARLY_FRAGMENT_TESTS_BIT` barrier flags
2023-08-29 12:45:56 +02:00
Rémi Verschelde fd7b27a473
Merge pull request #80909 from adamscott/web-fix-max-uniform-buffer-size-overflow
Fix integer value for `GL_MAX_UNIFORM_BLOCK_SIZE` overflowing
2023-08-28 15:03:50 +02:00
Juan Linietsky 407b16ab00
Debug CanvasItem redraw
I wanted to add this tool for years and always forget. This command line option:

```
$ godot.exe -e --debug-canvas-item-redraw
```

Allows to see when a canvas item is redrawn. This helps find out if something
in the UI is refreshing in a way it should not. Examples as such:

* Signals causing more of the UI to redraw.
* Container resizing causes more UI elements to redraw.
* Something using a timer is redrawing all time time, which can go unnoticed.

To my surprise, the editor UI is redrawing very efficiently. There is some
weird stuff with the scene tabs, redrawing when the inspector changes but most
things for the most part are fine.
2023-08-28 12:53:56 +02:00
Matias N. Goldberg 677d2d6fb0 Fix missing EARLY_FRAGMENT_TESTS_BIT barrier flags 2023-08-27 19:38:34 -03:00
jsjtxietian d48b95a305 fix glMapBufferRange return null when r_index + last_item_index > max_instances 2023-08-27 18:00:35 +08:00
Pedro J. Estébanez 49177b6eeb Make Windows' safe save more resilient 2023-08-25 18:28:35 +02:00
Adam Scott 9c7db7397f
Fix integer value for GL_MAX_UNIFORM_BLOCK_SIZE overflowing 2023-08-25 10:19:25 -04:00
Rémi Verschelde fef62a6860
Merge pull request #80781 from bitsawer/fix_vulkan_texture_upload
Fix Vulkan texture update
2023-08-21 19:32:12 +02:00
A Thousand Ships 6cb28e481f Fix memory access error for `MultiMesh` with GLES3
Buffer was incorrectly assigned when invalid data was provided
2023-08-19 16:01:21 +02:00
bitsawer 3daa19dd95 Fix Vulkan texture update 2023-08-19 12:18:54 +03:00
Rémi Verschelde 1537452aa9
Merge pull request #78013 from Calinou/cli-add-audio-output-latency-argument
Add a `--audio-output-latency` command-line argument
2023-08-17 15:43:14 +02:00
Hugo Locurcio ce57c2379c
Abort on startup with a visible alert if required Vulkan features are missing 2023-08-17 14:48:36 +02:00
Hugo Locurcio 6f1152bdbe
Add a `--audio-output-latency` command-line argument
This allows optimizing the audio output latency on higher-end CPUs,
especially in projects that do not expose a way to override this setting.
2023-08-17 14:45:17 +02:00
Rémi Verschelde c1dbc3dd04
Merge pull request #80288 from pkpro/memcpy_into_nullptr
Vulkan: Fix sanitizers error with empty shader name
2023-08-17 12:29:29 +02:00
Rémi Verschelde 5541567c1a
Merge pull request #80151 from WhalesState/Dev1
Fix GLES3 changing 2D shadow atlas size is broken
2023-08-17 11:23:24 +02:00
Mounir Tohami 2987dd0c71 fix GLES3 changing 2d shadow atlas size is broken 2023-08-16 15:58:23 +00:00
Rémi Verschelde 9d9043a9c8
Merge pull request #80654 from bitsawer/fix_global_uniform_texture_set
Fix global shader uniform texture loading
2023-08-16 09:17:25 +02:00
Rémi Verschelde d1b8e9abd6
Merge pull request #80571 from darksylinc/matias-resize-window-fix
Fix validation error when resizing window
2023-08-16 09:13:53 +02:00
Rémi Verschelde 04c2bc5a37
Merge pull request #80424 from DarioSamo/rd-buffer-copy-vulkan
Add `buffer_copy` method to RenderingDevice
2023-08-16 09:13:06 +02:00
Matias N. Goldberg 0b09fdd96c Fix validation error when resizing window
Sometimes when resizing the window we may get the following validation
error:

ERROR: VALIDATION - Message Id Number: -370888023 | Message Id Name:
VUID-vkAcquireNextImageKHR-semaphore-01286
	Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01286 ]
Object 0: handle = 0xdcc8fd0000000012, type = VK_OBJECT_TYPE_SEMAPHORE;
| MessageID = 0xe9e4b2a9 | vkAcquireNextImageKHR: Semaphore must not be
currently signaled or in a wait state. The Vulkan spec states: If
semaphore is not VK_NULL_HANDLE it must be unsignaled
(https://vulkan.lunarg.com/doc/view/1.2.198.1/linux/1.2-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01286)

In VulkanContext::prepare_buffers the problem was that
vkAcquireNextImageKHR returned VK_SUBOPTIMAL_KHR but it already signaled
the semaphore (because it is possible to continue normally with a
VK_SUBOPTIMAL_KHR result).

Then we recreate the swapchain and reuse the
w->image_acquired_semaphores[frame_index] which is in an inconsistent
state.

Fixed by recreating the semamphores along the swapchain.

Fix #80570
2023-08-15 20:57:49 -03:00
bitsawer 41def3740a Fix global shader uniform texture loading 2023-08-15 14:18:26 +03:00
sakrel 80a36ff985 Add support for GLSL source-level debugging with RenderDoc (`--generate-spirv-debug-info`) 2023-08-12 14:56:49 +02:00
Dario 0d7deca4e2 Add buffer_copy method to RenderingDevice interface and an implementation for the Vulkan driver.
Direct buffer copies are required to perform certain operations more efficiently, as the only current alternative is to download the buffer to the CPU and upload it again. As the first use case, the new function is used when enabling motion vectors on multimeshes.
2023-08-12 09:38:39 -03:00
Pavel Kraynyukhov 77b02359c9
Vulkan: Fix sanitizers error with empty shader name
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-08-09 12:12:56 +02:00
bruvzg 8aa6f29b56
[FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
Rémi Verschelde 1163dac9e3
Merge pull request #80215 from clayjohn/HDR-2D
Add option to enable HDR rendering in 2D
2023-08-08 16:57:33 +02:00
Rémi Verschelde 048a164083
Merge pull request #79693 from bruvzg/com_ath
[Windows] Initialize COM as apartment-threaded.
2023-08-07 14:48:40 +02:00
clayjohn 57eb762bae Add option to enable HDR rendering in 2D
This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance

Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear.
This is necessary for proper HDR screen support in the future.
2023-08-07 11:24:03 +02:00
Rémi Verschelde cc6a60913a
Merge pull request #78325 from akien-mga/libpng-moar-intrinsics
libpng: Enable intrinsics on x86/SSE2, ppc64/VSX, and all arm/NEON
2023-08-04 17:04:07 +02:00
Rémi Verschelde 2c9b7fc7a8
libpng: Enable intrinsics on x86/SSE2, ppc64/VSX, and all arm/NEON 2023-08-04 14:57:21 +02:00
Luke Hubmayer-Werner 9e844cc0c8 PulseAudio: Remove get_latency() caching 2023-08-04 15:35:13 +09:30
clayjohn 558f4b7559 Initialize shader placeholders up front
Then use the placeholder to create the shader instead of swapping RIDs
This fixes a false positive that reported leaked shaders
2023-08-03 16:13:33 +02:00
Yuri Sizov eda04c5658 Merge pull request #80071 from darksylinc/matias-fixes2
Fix validation layer warnings
2023-08-01 17:26:04 +02:00
Yuri Sizov bffbc5dd3e Merge pull request #80070 from clayjohn/GLES3-depth-prepass
Enable depth writes during shadow pass and depth pass. Disable during color pass
2023-08-01 17:26:00 +02:00
Yuri Sizov 1c40263665 Merge pull request #79606 from clayjohn/ShaderRD-compilation-groups
Shader rd compilation groups
2023-08-01 17:25:16 +02:00
Yuri Sizov 8b12849fef Merge pull request #79876 from LRFLEW/mobalpha
Fix transparent viewport backgrounds with custom clear color
2023-07-31 21:01:32 +02:00
Matias N. Goldberg 4ce41495b1 Fix validation layer warnings
1. Validation layers on Windows were complaining w/
VUID-VkSwapchainCreateInfoKHR-surface-01270 that we were not calling
vkGetPhysicalDeviceSurfaceSupportKHR before vkCreateSwapchainKHR.

2. Godot was only calling vkGetPhysicalDeviceSurfaceSupportKHR at
startup, but it should be doing this for every window w/ a new surface
it wants to create, not just the first one.
- In practice this will likely not make a difference. If
vkGetPhysicalDeviceSurfaceSupportKHR returns false after initialization,
there's nothing we can do about it and it is likely because something
else went terribly wrong, which is why the error message is worded like
that.
- This is mostly to shut up validation layers. Though technically,
the layers are right.

3. Do not call vkGetPhysicalDeviceSurfaceSupportKHR on queues we don't
even plan on ever using. We don't know how drivers will react to that
(e.g. they may preemptetively allocate resources to support presentation
on exotic queues, instead of just saying no). Just behave like every
other Vulkan app out there.
2023-07-30 17:07:27 -03:00
clayjohn b986afed46 Enable depth writes during shadow pass and depth pass. Disable during color pass
This fixes an unreported performance bug. Basically, without this change, the depth prepass did nothing
2023-07-30 21:59:28 +02:00
LRFLEW 6effd3cde7 Fix transparent viewport backgrounds with custom clear color 2023-07-30 06:19:47 -05:00
Matias N. Goldberg 472226422e Fix uninitialized variable ending up sent to Vulkan
The first time a shader is compiled Godot performs the following:

```cpp
for (uint32_t i = 0; i < SHADER_STAGE_MAX; i++) {
	if
(spirv_data.push_constant_stages_mask.has_flag((ShaderStage)(1 << i))) {
		binary_data.push_constant_vk_stages_mask |=
shader_stage_masks[i];
	}
}
```

However binary_data.push_constant_vk_stages_mask is never initialized to
0 and thus contains garbage data or'ed with the good data.

This value is used by push constants (and many other things) thus it can
be a big deal.

Fortunately because the relevant flags are always guaranteed to be set
(but not guaranteed to be unset), the damage is restricted to:

1. Performance (unnecessary flushing & over-excessive barriers)
2. Overwriting push descriptors already set (this would be serious,
doesn't seem to be an issue)
3. Driver implementations going crazy when they see bits set they don't
expect (unknown if this is an issue)

This uninitialized value is later saved into the binary cache.

Valgrind is able to detect this bug on the first run, but not on the
subsequent ones because they data comes from a file.

cache_file_version has been bumped to force rebuild of all cached
shaders. Because the ones generated so far are compromised.
2023-07-29 18:28:33 -03:00
Yuri Sizov 1fe49e7271 Merge pull request #79142 from BastiaanOlij/register_render_buffers
Expose RenderSceneBuffers(RD) through ClassDB
2023-07-27 15:22:27 +02:00
Yuri Sizov d894a2ff57 Merge pull request #79883 from clayjohn/GLES3-shader-cache-dir
Check if shader cache directory is available before using cache
2023-07-26 18:40:35 +02:00
Bastiaan Olij 4874b96033 Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
Bastiaan Olij 63d6e9c557 Add custom texture create function 2023-07-26 20:46:34 +10:00
Yuri Sizov 202e4b2c1e Merge pull request #79884 from Dragoncraft89/master
Vulkan: Fix dangling pointers in `_clean_up_swap_chain`
2023-07-25 21:51:38 +02:00
Yuri Sizov 7bb732cc38 Merge pull request #79866 from adamscott/fix-file-permissions-web
Fix file permissions for the web platform (affects every Unix-like platform)
2023-07-25 21:26:30 +02:00
Yuri Sizov 3f2e901633 Merge pull request #79865 from clayjohn/discard-shader
Fix use of discard in shaders
2023-07-25 21:26:27 +02:00
Yuri Sizov 08cffc128f Merge pull request #79812 from ParsleighScumble/parsleigh/init-sky-scene-state
Use defaults to initialize sky data in case of no sky
2023-07-25 21:26:23 +02:00
Florian Kothmeier 7f7a2b2557
Fix dangling pointers in _clean_up_swap_chain 2023-07-25 14:41:57 +02:00
clayjohn 52fb5bf986 Check if shader cache directory is available before using cache 2023-07-25 14:33:37 +02:00
Adam Scott b6faccccd5
Fix file permissions for the web platform 2023-07-25 08:29:24 -04:00
Clay 7c812cd7e9 Fix use of discard in shaders
discard was being included in all shaders set to depth pass opaque, which is the majority of shaders

Instead it should only be used with alpha prepass materials
2023-07-24 23:21:04 +02:00
Parsleigh Scumble 67c13fe4eb Use defaults to initialize sky data in case of no sky 2023-07-24 10:41:13 -07:00
Yuri Sizov 21524e26e0 Merge pull request #79849 from bitsawer/fix_particles_and_compute_threading
Fix Vulkan multithreaded compute list and GPU particle processing
2023-07-24 19:33:52 +02:00
Yuri Sizov b1f4e58bbf Merge pull request #79772 from Malcolmnixon/gles-skeletons
Unbind the framebuffer when updating meshes
2023-07-24 19:33:27 +02:00
Yuri Sizov 4ba24f6492 Merge pull request #79685 from LRFLEW/glinval
GLES3: Don't call `glTexParameter*` for invalid filter and repeat modes
2023-07-24 19:33:12 +02:00
Yuri Sizov 3e9fadc1dd Merge pull request #79660 from bitsawer/fix_opengl_multimesh
Fix GLES3 multimesh rendering when using colors or custom data
2023-07-24 19:33:05 +02:00
bitsawer 5d18e2ee00 Fix Vulkan multithreaded compute list and GPU particle processing 2023-07-24 12:56:55 +03:00
LRFLEW 3e9173f11a GLES3: Don't call glTexParameter* for invalid filter and repeat modes 2023-07-21 19:26:57 -05:00
Malcolm Nixon 679f5bf410 Unbind the framebuffer when updating meshes.
While the vertex shaders used to update the meshes aren't actually rendering to the framebuffer, they may still refuse to run with some framebuffers bound - such as XR with multiple views.
2023-07-21 19:34:12 -04:00
Yuri Sizov f932c1aba1 Merge pull request #79526 from Zylann/fix_rd_thread_safe
Fix missing `_THREAD_SAFE_METHOD_` missing from `RenderingDeviceVulkan` `submit` and `sync`
2023-07-21 17:54:39 +02:00
Yuri Sizov 4acb8c66a1 Merge pull request #79568 from LRFLEW/glaniso
GLES3: Reset anisotropic filtering when changing texture filtering mode
2023-07-21 17:15:39 +02:00
clayjohn e970f5249c Add Shader compile groups to RD Shader system
This allows us to specify a subset of variants to compile at load time and conditionally other variants later.

This works seamlessly with shader caching.

Needed to ensure that users only pay the cost for variants they use
2023-07-21 16:42:30 +02:00
bruvzg 4bfb820d32 [Windows] Initialize COM as apartment-threaded. 2023-07-20 12:14:16 +03:00
bitsawer 9897f1cfb9 Fix GLES3 multimesh rendering when using colors or custom data 2023-07-20 11:54:34 +03:00
Fabio Alessandrelli 28001b9ef6 [Net] Explicitly handle buffer errors in send/recv 2023-07-19 10:08:25 +02:00
Marc Gilleron 8722cbc0a0 Add missing thread-safe method macros to RD Vulkan submit and sync 2023-07-18 20:04:51 +01:00
LRFLEW 90f0e97eb9 GLES3: reset anisotropic filtering when changing texture filtering mode 2023-07-17 00:18:39 -05:00
Bastiaan Olij a22f495a3c Split raster barrier into vertex and fragment barrier 2023-07-15 12:30:32 +10:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Yuri Sizov bb15241e06 Merge pull request #77740 from ChibiDenDen/simplify_vulkan
Replace sampler arrays with constant sampler elements, simplify and reuse code for all shaders
2023-07-12 17:16:12 +02:00
Yuri Sizov a33b548092 Merge pull request #78168 from clayjohn/GLES3-gaussian-rt
Use Gaussian approximation for backbuffer mipmaps in GL Compatibility renderer
2023-07-12 15:08:57 +02:00
Kamil Brzoskowski 3cd865dbe8
Fix formatting of dlopen error message on Windows
And harmonize the format for all platforms.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-07-09 23:39:45 +02:00
Rémi Verschelde 1453dc9d5d
Merge pull request #79143 from clayjohn/wayland-menu
Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain
2023-07-09 12:24:07 +02:00
Rémi Verschelde 43c0fa7f4b
Merge pull request #78797 from Calinou/remove-redundant-vformat
Remove uses of `vformat()` with no placeholders
2023-07-08 18:18:35 +02:00
Rémi Verschelde 98358b2822
Merge pull request #78794 from joemarshall/patch-1
Fix threading bug in Vulkan rendering device
2023-07-08 18:17:46 +02:00
clayjohn df021b5063 Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain 2023-07-07 10:19:28 +02:00
Rémi Verschelde c566b03f26
Merge pull request #78852 from clayjohn/Particles-glitch
Initialize particles instance buffer in case it is used before being updated
2023-07-07 08:28:28 +02:00
clayjohn 35ed7c770b Initialize particles instance buffer in case it is used before being updated 2023-06-29 13:24:40 -07:00
Hugo Locurcio dcc92c174e
Remove uses of `vformat()` with no placeholders
This is identical to passing the string directly.
2023-06-28 16:27:55 +02:00
Joe Marshall c52fadbe75
fix threading bug in vulkan rendering device 2023-06-28 13:50:25 +01:00
clayjohn 7c37a32897 Use a filter with mipmaps when initializing textures with mipmaps in GL Compatibility renderer
This works around a driver bug in some older devices and should be harmless on any spec-compliant device
2023-06-26 10:45:24 -07:00
clayjohn cc89321c9c Reset filter/repeat state of textures in GL Compatibility renderer when render target is cleared 2023-06-23 10:57:56 -07:00
Brecht Kuppens 55fc56bfd4 Moved variables closer to usage to fix unused variable warning 2023-06-22 23:01:09 +02:00
Rémi Verschelde cb73a6e9f9
Merge pull request #78490 from clayjohn/GLES3-particles-subemit
Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
2023-06-22 21:02:38 +02:00
Qiqi Wu df740f6865 free color and depth texture after check framebuffer complete failed 2023-06-22 09:13:24 +08:00
ChibiDenDen 35715e510f replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +03:00
clayjohn 8a5af8183a Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-06-21 12:56:52 -07:00
bitsawer dab0871d41 Fix invalid RID errors when freeing a mesh with blend shapes 2023-06-19 11:07:15 +03:00
bruvzg 131e49bf13
[Unix] Fix temporary file permissions. 2023-06-16 23:34:27 +03:00
Qiqi Wu c8e3f00e5d GLES3: Remove unimplemented texture_create() declaration 2023-06-16 18:58:23 +08:00
Rémi Verschelde 7dddd8a22c
Merge pull request #78302 from clayjohn/GLES3-screen-warning
Remove outdated warning when using screen texture in GL Compatibility renderer
2023-06-16 10:23:27 +02:00
Rémi Verschelde 9e81aeda33
Merge pull request #78287 from clayjohn/GLES3-texture-replace
Copy texture filter/repeat modes when replacing a texture in the GL Compatibility backend
2023-06-16 10:23:03 +02:00
Rémi Verschelde 1710a7d303
Merge pull request #78285 from clayjohn/GLES3-viewport-filter
Ensure filter/repeat is cached by Viewport texture in GL Compatibility renderer
2023-06-16 10:22:33 +02:00
clayjohn 36a005fafc
Add RENDERING_INFO parameters to GL Compatibility renderer
This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times

This also adds memory tracking to textures and buffers to catch memory leaks.

This also cleans up some memory leaks that the new system caught.
2023-06-16 09:10:00 +02:00
clayjohn 8a7f02addb Remove outdated warning when using screen texture in GL Compatibility renderer 2023-06-15 18:48:50 -07:00
clayjohn 96b2743782 Ensure filter/repeat is cached by Viewport texture in GL Compatibility renderer 2023-06-15 13:08:55 -07:00
clayjohn 3e211b7f74 Copy texture filter/repeat modes when replacing a texture in the GL Compatibility backend 2023-06-15 13:06:42 -07:00
jpcerrone bd786ce0d9 Fix for Win+M crashing the editor
Fixes #77790
Adds missing 'break' statement to 'VulkanContext::prepare_buffers' function.
It was mistakenly removed in #72859
2023-06-14 14:34:09 -03:00
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