Commit Graph

3120 Commits

Author SHA1 Message Date
Bastiaan Olij 57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
Rémi Verschelde cfd21adf64
Merge pull request #49092 from BastiaanOlij/multiview_clustered
Add multiview support to the clustered forward renderer
2022-03-16 00:17:57 +01:00
reduz 8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
Rémi Verschelde 51bbcbdec2
Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00
snowapril b6f72f2b4a Fix D_GGX code which can cause divide-by-zero val
When given roughness is lower than 0.01, d value in original code will
be zero. This can make last return value as NAN because of
divide-by-zero. This is well addressed in issue #56373.

Modified code is referenced on D_GGX function of google/filament
(https://github.com/google/filament/blob/main/shaders/src/brdf.fs#L54-L79)

Signed-off-by: snowapril <sinjihng@gmail.com>
2022-03-14 13:25:05 +09:00
Rémi Verschelde 972bca75a8
Merge pull request #59107 from otonashixav/expose-add-animation-slice 2022-03-13 17:18:42 +01:00
bruvzg aada395354
Fix text clipping on the right side. 2022-03-13 17:26:00 +02:00
Xavier Loh a0e720efb2 Expose `RenderingServer::canvas_item_add_animation_slice` in GDScript 2022-03-13 22:53:24 +08:00
Rémi Verschelde 7ed8d52fb2
Merge pull request #58819 from vreon/fix-eyedir-z
Fix flipped EYEDIR.z in sky shaders
2022-03-13 00:55:32 +01:00
bruvzg b32e8d63d8
Add options to embolden and transform font outlines to simulate bold and italic typefaces. 2022-03-11 14:02:30 +02:00
Rémi Verschelde 1c51fd48db
Merge pull request #58781 from BastiaanOlij/openxr_signals_and_events
Adding signals and events to OpenXR interface
2022-03-10 18:10:26 +01:00
reduz 6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
Bastiaan Olij d11cb5fe98 Adding signals and events to OpenXR interface
Improving interaction profile logic
2022-03-10 17:14:56 +11:00
kobewi 39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00
Rémi Verschelde 9b05f29894 Remove unused GDNative code
This has been superseded by GDExtension so this code is no longer useful
nor usable.

There's still some GDNative-related stuff in platform export code which
needs to be adapted for GDExtension (e.g. to include GDExtension libraries
in exports).
2022-03-09 13:59:03 +01:00
Jesse Dubay d437355f55 Sky renderer: Only flip Z when calculating panorama_coords 2022-03-08 19:51:43 -08:00
Rémi Verschelde 1561737055
Merge pull request #49447 from Calinou/remove-shadow-color-property
Remove unused `shadow_color` property from Light3D
2022-03-08 07:48:05 +01:00
Rémi Verschelde f488a841c7
Merge pull request #58779 from techiepriyansh/forward-mobile-ambient-accum 2022-03-07 16:46:33 +01:00
Jesse Dubay ff2a5c04b1 Sky renderer: Don't invert Z component of light direction 2022-03-06 23:58:54 -08:00
Rémi Verschelde ffd64505c5
Merge pull request #58832 from reduz/uniform-set-cache
Add a UniformSet cache
2022-03-07 07:19:58 +01:00
lawnjelly f199d2c33c [4.x] BVH - Fix area-area collision regression
Minimal approach to fixing regression whereby static areas where not detect dynamic areas.
2022-03-06 14:03:19 +00:00
reduz b0ca03b0a2 Add a UniformSet cache
* Changed syntax usage for RD::Uniform to create faster with a single RID
* Converted render pass setup to use this in clustered renderer to test.

This is the first step into creating a proper uniform set cache system to simplify large parts of the codebase.
2022-03-06 13:03:33 +01:00
Jesse Dubay 80345f7d4e Fix flipped EYEDIR.z in sky shaders 2022-03-05 17:49:32 -08:00
bruvzg e88522f5b5
[TextServer] Improve word breaking when there are multiple spaces between words. 2022-03-05 22:31:58 +02:00
Priyansh Rathi 8c37cfa5bb
use the computed value ambient_accum for ambient_light in scene_forward_mobile.glsl 2022-03-05 14:24:40 +05:30
Rémi Verschelde 0d1e3893d9
Merge pull request #57630 from lawnjelly/bvh4_templated_checks
[4.x] BVH - Sync BVH with 3.x
2022-03-04 23:29:38 +01:00
Hugo Locurcio aea104deb7
Remove unused `shadow_color` property from Light3D
This shadow color property was no longer effective since the shaders
were optimized to improve occupancy.
2022-03-04 23:12:18 +01:00
Rémi Verschelde c787f59931
Merge pull request #58734 from Calinou/tweak-render-timestamp-names
Tweak render timestamp names for explicitness and consistency
2022-03-04 20:43:08 +01:00
Rémi Verschelde 3078b92dff
Merge pull request #58512 from Calinou/light3d-add-distance-fade 2022-03-04 12:26:29 +01:00
Hugo Locurcio c509a3a3a5
Tweak render timestamp names for explicitness and consistency
- Add 2D and 3D in timestamp names when needed to avoid ambiguity.
- Use present tense in all render timestamp names.
- Add a space after ">" (begin) and "<" (end) symbols.
- Remove redundant "End" in render timestamp names (indicated by "<").
2022-03-04 08:46:12 +01:00
Bastiaan Olij e4b7a69bb6 Add multiview/stereoscopic rendering support to the clustered forward renderer 2022-03-03 20:06:14 +11:00
Rémi Verschelde dae0135ae5
Revert "PitchShift effect quality and performance tweaks for different pitch scale values" 2022-03-02 00:11:33 +01:00
Rémi Verschelde 0036a41a10
Revert "Fix particle trail glitch" 2022-03-01 20:16:10 +01:00
Rémi Verschelde e7176e6c85
Merge pull request #58614 from Calinou/ssr-roughness-quality-enum-fix-typo
Fix typo in SSR roughness quality enum value names
2022-02-28 10:51:20 +01:00
Rémi Verschelde babac6e08c
Merge pull request #58549 from floppyhammer/fix-particle-trail
Fix particle trail glitch
2022-02-28 07:17:59 +01:00
Hugo Locurcio 83efe4d8b0
Fix typo in SSR roughness quality enum value names 2022-02-28 01:06:26 +01:00
floppyhammer 1675c5375e Fix particle trail glitch 2022-02-26 13:53:06 +08:00
Hugo Locurcio b1a295b739
Implement distance fade properties in OmniLight3D and SpotLight3D
This can be used to fade lights and their shadows in the distance,
similar to Decal nodes. This can bring significant performance
improvements, especially for lights with shadows enabled and when
using higher-than-default shadow quality settings.

While lights can be smoothly faded out over distance, shadows are
currently "all or nothing" since per-light shadow color is no longer
customizable in the Vulkan renderer. This may result in noticeable
pop-in when leaving the shadow cutoff distance, but depending on the
scene, it may not always be that noticeable.
2022-02-25 15:17:35 +01:00
bruvzg 74ff5921d6 Improve popup window handling.
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +02:00
Darryl Ryan 3ce5cceef9 Filament specular fix. Clamp dot product between normal and view vectors. Fixes #58459. 2022-02-23 18:16:52 +00:00
Rémi Verschelde 1f3916e0b6
Merge pull request #56394 from BastiaanOlij/OpenXR_Core4 2022-02-23 13:36:07 +01:00
Rémi Verschelde 96261838c5
Merge pull request #57956 from Eoin-ONeill-Yokai/audio_stream_hotfix 2022-02-23 13:04:47 +01:00
Bastiaan Olij a78a9fee71 Implementing OpenXR driver 2022-02-23 12:02:24 +01:00
clayjohn fe49244611 Use Filament specular models and parametrization 2022-02-22 19:39:41 -08:00
Eoin O'Neill ded9dc1e82 Add missing binding to AudioStream class
This allows for the extension of AudioStream where you can call
`instance_plackback` on child AudioStream instances within gdscript,
much like the implementation of some child classes in C++.

See `AudioStreamRandomPitch` for an example of how this can be used.
2022-02-22 18:11:40 -08:00
floppyhammer 0d5472dd1a Fix GPUParticles2D emission offset in global coords 2022-02-22 17:50:01 +08:00
Rémi Verschelde c77348b468
Merge pull request #58419 from clayjohn/Vulkan-anisotropy-crash 2022-02-22 09:09:16 +01:00
clayjohn 2da35d2b94 Fix shader compilation error with anisotropy 2022-02-21 22:58:33 -08:00
clayjohn 9d104ad839 Use properly use non-perceptual roughness when filtering radiance 2022-02-21 22:53:12 -08:00
Ricardo Buring d525ea2614 In final phase of test_body_motion, move and cull AABB for body once, instead of for every shape 2022-02-18 19:45:25 +01:00
Rémi Verschelde 7a68ee5134
Merge pull request #58266 from clayjohn/revert-sky-change 2022-02-18 12:07:40 +01:00
Pierre-Thomas Meisels fd02f529fa Fix default value for DisplayServer::virtual_keyboard_show Rect2 parameter 2022-02-18 09:43:02 +01:00
Rémi Verschelde 48b61159b2
Merge pull request #58106 from Calinou/audioserver-capture-device-property 2022-02-18 09:07:36 +01:00
Rémi Verschelde 488116e4d8
Merge pull request #58236 from bruvzg/win_min_fix 2022-02-18 09:07:10 +01:00
clayjohn e0384fb70e Revert "Fix default sky process mode not being Real-Time"
This reverts commit aa1cba1d53.
2022-02-17 23:13:10 -08:00
Hugo Locurcio 1d35b37499
Expose `AudioServer.capture_device` as a property
This is more consistent with `AudioServer.device` (for output),
which is already exposed as a property.
2022-02-17 19:35:46 +01:00
Rémi Verschelde e1b8a86b2b
Merge pull request #58177 from clayjohn/VULKAN-prefiltered-radiance 2022-02-17 17:53:42 +01:00
bruvzg 0c27667124 [Windows] Fix Vulkan driver crash on sub-window minimization. 2022-02-17 13:34:08 +02:00
clayjohn 48728a79b6 Use prefiltered radiance 2022-02-16 21:37:18 -08:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Yuri Roubinsky a85b000967 Fix antialiasing for beginning/end of line in `canvas_item_add_polyline` 2022-02-16 14:34:42 +03:00
clayjohn a38c3a763a Properly exclude lights that are marked as sky only 2022-02-16 00:16:56 -08:00
Hugo Locurcio aa1cba1d53
Fix default sky process mode not being Real-Time
The change in 09563e4bd8 wasn't
consistently carried out everywhere needed.
2022-02-16 01:51:48 +01:00
reduz 4f73d3beb4 Add Particle Shader Userdata
* Adds optional vec4 USERDATA1 .. USERDATA6 to particles, allowing to store custom data.
* This data is allocated on demand, so shaders that do not use it do not cost more.
2022-02-15 19:20:31 +01:00
Rémi Verschelde 760a95e86a
Merge pull request #57877 from bruvzg/subpixel_gl_pos 2022-02-15 13:58:38 +01:00
Rémi Verschelde 5a6da0b2a9
Merge pull request #57905 from V-Sekai/fix_instance_clear_warnings
Free surface vertex_buffers after vertex_arrays to silence warnings
2022-02-15 08:32:32 +01:00
Rémi Verschelde af91a42b0a
Merge pull request #57904 from V-Sekai/fix_double_free_warning
Fixes some 'Attempted to free invalid ID' warnings in mobile renderer
2022-02-15 08:30:44 +01:00
Hugo Locurcio 44af98cd12
Compute SSAO at half resolution by default
This provides a significant speedup for a small quality loss.

The quality loss is generally more noticeable during a project's
early stages of development (e.g. in level blockouts)
than it is in a finished project.
2022-02-14 18:53:09 +01:00
Haoyu Qiu 66838d88e1 Validate PhysicsDirectSpaceState{2,3}D::_intersect_point input 2022-02-14 22:21:28 +08:00
Rémi Verschelde f45fedaf96
Merge pull request #57985 from Pineapple/pitchshift-tweaks
PitchShift effect quality and performance tweaks for different pitch scale values
2022-02-14 08:27:08 +01:00
bruvzg 29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
Rémi Verschelde d3a6b6daaa
Merge pull request #56953 from bruvzg/ex_wnd 2022-02-12 16:46:55 +01:00
Rémi Verschelde d1dbe21c56
Merge pull request #57980 from akien-mga/vulkan-1.3.204 2022-02-12 10:21:27 +01:00
Rémi Verschelde 7a7fabe4f6
Merge pull request #57641 from Geometror/compilation-time-improvements-1 2022-02-12 09:46:02 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
bruvzg 7d59b81d79
Add exclusive window handling to DisplayServer (on macOS and Windows). 2022-02-12 00:14:09 +02:00
Rémi Verschelde 006ce4d83d
Merge pull request #57938 from jordigcs/negative-refresh-rate-fallback 2022-02-11 23:02:58 +01:00
Bartłomiej T. Listwon 29b6ed9283 Audio quality improvements in PitchShift 2022-02-11 20:21:28 +01:00
Bartłomiej T. Listwon c02e979dbf Pass audio samples untouched for pitch_scale around 1.0f 2022-02-11 20:21:26 +01:00
Rémi Verschelde 18d6b75ba8
RendererRD: Remove binding specifier for push constants
This is unsupported and glslang made it raise an error in 11.7.0:
https://github.com/KhronosGroup/glslang/pull/2810

Co-authored-by: Clay John <claynjohn@gmail.com>
2022-02-11 18:42:32 +01:00
jordi 7a9972afc2 Change SCREEN_GET_REFRESH_RATE_FALLBACK to -1.0 2022-02-11 10:25:38 -06:00
Rémi Verschelde 2921cf6a99
Merge pull request #57888 from dusakus/depanoramize-spot-projector
remove normal_to_panorama from spotlight projector
2022-02-11 10:41:00 +01:00
Hugo Locurcio 66d27df12f
Fix 3D sky update performance regression 2022-02-10 20:21:28 +01:00
Rémi Verschelde e4e6813baf
Merge pull request #57535 from Calinou/visibility-range-fade-use-easing 2022-02-10 18:18:53 +01:00
Rémi Verschelde 11cefc2b28
Merge pull request #57104 from clayjohn/VULKAN-sky-conflict 2022-02-10 17:46:42 +01:00
Rémi Verschelde d2fa379f2b
Merge pull request #54158 from Calinou/decrease-default-soft-shadow-quality 2022-02-10 17:38:24 +01:00
Rémi Verschelde 7332aff3fd
Merge pull request #54677 from Calinou/voxelgi-default-low-quality 2022-02-10 17:35:52 +01:00
Rémi Verschelde c6199da8b8
Merge pull request #39965 from Calinou/tweak-sdfgi-defaults 2022-02-10 17:31:54 +01:00
Rémi Verschelde 2fafcfebdf
Merge pull request #57707 from Calinou/sdfgi-tweak-default-num-cascades 2022-02-10 17:27:42 +01:00
Rémi Verschelde 67c6442844
Merge pull request #57628 from Calinou/shadow-atlas-default-enable-16-bits 2022-02-10 17:19:37 +01:00
SaracenOne 824ece9d89 Free surface vertex_buffers after vertex_arrays due dependencies 2022-02-10 10:34:34 +00:00
SaracenOne 71eb3f6df5 Fix _free_render_buffer_data freeing shared half_texture and half_fb 2022-02-10 10:04:18 +00:00
Yuri Roubinsky 5d536f06c2
Merge pull request #57875 from ZuBsPaCe/shader-instance-qualifier-format-string 2022-02-10 08:34:47 +03:00
Bartłomiej Dusak 38423565e4 remove normal_to_panorama from spotlight projector 2022-02-09 23:47:44 +01:00
Rémi Verschelde d22ac13bc2
Merge pull request #57715 from Faless/debugger/4.x_core_includes_and_servers
[Debugger] Move most profilers to ServersDebugger, fix core includes.
2022-02-09 21:57:32 +01:00
ZuBsPaCe 2e2c9a27b6 Fixed shader error message for instance qualifier
Moved argument from RTR to vformat. Message is now similar to uniform-arrays-error further down.
2022-02-09 21:32:09 +01:00
Ellen Poe 41a158af56
Add AudioStreamRandomizer, replacing AudioStreamRandomPitch
Add additional randomization options.
2022-02-09 00:05:32 +01:00
reduz db43237c78 Fix BLEND_SHAPE_MASK
* Should now be correct
* Supersedes 53738
2022-02-08 13:50:01 +01:00
Rémi Verschelde a6abeb6b20
Merge pull request #57682 from clayjohn/VULKAN-canvas-blur 2022-02-07 10:16:50 +01:00
Rémi Verschelde 3ae38edc8e
Merge pull request #56844 from Calinou/ssr-fix-background-line-master
Fix visible background line in intersections in screen-space reflections
2022-02-06 23:22:15 +01:00
Fabio Alessandrelli 6583797305 [Debugger] Move servers-related behaviours to ServersDebugger.
Forcing draw during debug break is now handled by ServersDebugger, and
only happens when the proper message is sent from the EditorDebugger
("servers:draw").
In a similar way, briging the window in foreground is now also handled
by ServersDebugger upon receiving "servers:foreground" which is sent by
the EditorDebugger when resuming from a break ("continue").
2022-02-06 17:36:48 +01:00
Fabio Alessandrelli 87f4bbd668 [Debugger] Move most profilers to ServersDebugger.
Also splits bandwidth/rpc profiler (RPCProfiler is now in
SceneDebugger).
2022-02-06 17:36:48 +01:00
jmb462 1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Hugo Locurcio 7721e19ccc
Tweak default SDFGI settings for better quality
- Enable Read Sky Light to get proper outdoors lighting out of the box.
- Set bounce feedback to 0.5 by default to get a better quality result.
  - Higher values may cause infinite feedback with bright surfaces.
- Increase the number of frames to converge to improve quality
  at the cost of latency. Most scenes are fairly static after all.
- Use 75% Y scale by default as most scenes are not highly vertical.

- Reorder the Y scale enum to go from the lowest Y scale to the highest.
  Also rename the "Disabled" setting to "100%" for clarity.
2022-02-06 15:28:59 +01:00
Hugo Locurcio b9cfc74f29
Decrease the default number of SDFGI cascades to 4
This improves rendering performance noticeably, especially when the
camera moves fast.

On a medium-sized test scene on a GTX 1080 in 2560×1440, going
from 6 to cascades saves 0.5 ms of frame time while looking visually
identical (as most of the scene fits within the 4 cascades).
2022-02-06 15:01:25 +01:00
Yuri Roubinsky a2484c3293 Fix unknown identifier error in for loop 2022-02-06 08:38:33 +03:00
clayjohn 60d8df3fee Optimize and fix backbuffer gaussian blur 2022-02-05 15:03:39 -08:00
reduz 74adf0bf2e Remove RID_Owner.get_rid_by_index
* Implementing this function efficiently is not really possible.
* Replaced by an option to get all RIDs into a buffer for performance.
2022-02-05 11:59:34 +01:00
Rémi Verschelde eb371dee01
Merge pull request #57651 from theoniko/theoniko-effects_rc.cpp
Fix copy paste bug in renderer_rd/effects_rd.cpp
2022-02-05 10:15:38 +01:00
Yuri Roubinsky e01d08159c Few more fixes to for loop in shaders 2022-02-05 08:42:32 +03:00
theoniko 0c0ff5da50 Fix copy paste bug in renderer_rd/effects_rd.cpp 2022-02-05 06:41:30 +01:00
lawnjelly f8eaab5b47 BVH - Sync BVH with 3.x
Templated mask checks and generic NUM_TREES
Fix leaking leaves
2022-02-04 16:51:21 +00:00
Hugo Locurcio e4eafb254a
Enable 16-bit shadow atlas by default in the RenderingServer methods
16-bit shadow atlases are already the default in the project settings,
but low-level methods used 24-bit shadows by default.

This makes low-level methods more consistent with the default project
settings to avoid accidental performance issues when users change
the shadow size at run-time.
2022-02-04 16:41:08 +01:00
Rémi Verschelde 225a3b2545
Merge pull request #57341 from bruvzg/win_multiwin_fs 2022-02-04 13:28:56 +01:00
Rémi Verschelde 2e320dcf87
Merge pull request #57617 from bruvzg/char_cleanup 2022-02-04 13:06:38 +01:00
Rémi Verschelde d235c1bb19
Merge pull request #57335 from jordigcs/display-refresh-rate 2022-02-04 11:51:07 +01:00
bruvzg f4ea9cd9f3
[Windows] Add WS_BORDER flag to windows in WINDOW_MODE_FULLSCREEN mode to allow multi-window interface in full-screen.
[Windows] Add WINDOW_MODE_EXCLUSIVE_FULLSCREEN without WS_BORDER flag enabled (no multi-window support).
2022-02-04 12:08:46 +02:00
bruvzg 244db37508
Cleanup and move char functions to the `char_utils.h` header. 2022-02-04 11:35:01 +02:00
jordi 54dec44dba Add screen_get_refresh_rate to DisplayServer 2022-02-03 21:50:32 -06:00
Rémi Verschelde f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde 7191605324
Merge pull request #57587 from bruvzg/gde_fix_ptr_and_enum_returns
[GDExtension] Fix registration of functions with enum or native pointer return type.
2022-02-03 20:36:59 +01:00
bruvzg ddd96b3059
[GDExtension] Fix registration of functions with enum or native pointer return type. 2022-02-03 16:03:23 +02:00
Yuri Roubinsky 58696fd774 Allow multiple declarations in for loop in a shader 2022-02-03 11:35:38 +03:00
bruvzg 215bede6ff
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer. 2022-02-02 11:20:44 +02:00
Hugo Locurcio 20464fd103
Make visibility range alpha fade smoother
`smoothstep()` avoids the sudden transparency jump when entering or
leaving an object's alpha fade margin distance. This in turn helps
make opacity transitions less noticeable to the player, as it's
less likely to catch the player's eye.
2022-02-01 23:54:44 +01:00
Anilforextra fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
Rémi Verschelde b0604622a8
Merge pull request #57419 from orosmatthew/fix_ortho_lod 2022-01-31 18:06:44 +01:00
orosmatthew b0202c3a7d Fix orthogonal camera auto LOD calculation
- Do not take orthogonal camera's distance into account when calculating LOD.
- Only take into account screen size taken up.
2022-01-30 11:54:27 -05:00
Hugo Locurcio 736ac25306
Rename the physics server `run_on_thread` project settings
`run_on_separate_thread` is more explicit.
2022-01-29 17:35:50 +01:00
Nathan Franke 8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Rémi Verschelde 6ff6ec612d
Merge pull request #57318 from TechnoPorg/fix-face-area-calculation 2022-01-28 10:28:19 +01:00
TechnoPorg 02c002ff28 Fix triangular area calculation
It's a triangle, so the area should be halved.

Co-authored-by: Jeffrey Cochran <koenigcochran@gmail.com>
2022-01-27 09:57:15 -07:00
Rémi Verschelde 4b36b6e92a
Merge pull request #56785 from bruvzg/nat_handles_4 2022-01-27 12:12:34 +01:00
Rémi Verschelde 58324f4df8
Merge pull request #54574 from Ansraer/glow_map 2022-01-26 13:39:51 +01:00
Bastiaan Olij 98e5cd24db Improve XRInterface hooks into rendering 2022-01-26 13:55:44 +11:00
Rémi Verschelde d9fd16c8e4
Merge pull request #53954 from Chaosus/fix_quit_errors 2022-01-25 20:09:52 +01:00
Yuri Roubinsky b01065b9a4 Prevent checking of global uniform type outside the editor 2022-01-25 19:22:37 +03:00
jfons 238862bddb Minor fixes to shadow atlases:
* Erase shadow owner *before* setting it to RID().
* Add default texture in shadow atlas debug view to avoid error spam when no atlas is present.
* Fix typo.
2022-01-24 15:55:32 +01:00
Yuri Roubinsky 0e66587dbf Remove incorrect items from completion of main functions in shader 2022-01-24 10:37:47 +03:00
clayjohn 430d5d64aa Update Sky lights in sky setup function 2022-01-23 15:06:49 -08:00
Yuri Roubinsky 3ca57e5157 Fix incorrect unused local var warning in shader blocks 2022-01-23 20:22:31 +03:00
Rémi Verschelde 9b9440165b
Merge pull request #54890 from briansemrau/threadsafe-drawpute-lists
Make draw/compute lists threadsafe
2022-01-22 20:20:07 +01:00
clayjohn fdc1b1b03b Remove TRANSFORM built in from fog shaders 2022-01-21 23:03:41 -08:00
Omar Polo bd448e5535 Rename or refactor macros to avoid leading underscores
These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
Rémi Verschelde 7e3b92f81f
Merge pull request #55360 from Calinou/rename-bake-mode-properties 2022-01-20 17:35:32 +01:00
Rémi Verschelde dbd560cb68
Merge pull request #53857 from briansemrau/rd-free-rid-bind-rename 2022-01-20 17:24:34 +01:00
Ansraer 90652b1755 add support for glow maps 2022-01-20 16:47:25 +01:00
Rémi Verschelde 9e0973ca23
Merge pull request #56972 from lawnjelly/warn_unused 2022-01-20 15:34:41 +01:00
lawnjelly b411a731fe Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
Rémi Verschelde b6cb366884
Merge pull request #56949 from timothyqiu/has-clipboard 2022-01-20 12:09:45 +01:00
Rémi Verschelde 7057d26343
Merge pull request #56936 from BastiaanOlij/add_tracking_confidence 2022-01-20 12:09:06 +01:00
Bastiaan Olij 173105596e Adding a tracking confidence state to XRPose 2022-01-20 10:35:50 +11:00
Haoyu Qiu 314f309035 Add `DisplayServer.clipboard_has()` to check clipboard content 2022-01-19 23:44:20 +08:00
Rémi Verschelde cba2fd2e80
Revert "Add new scaling modes for splash screen"
This reverts commit fcc9f5ce39.

The feature is good but the implementation still needs more work.
A new PR will be made with a rework of this commit.
2022-01-19 16:09:52 +01:00
Yuri Roubinsky e0304f83e7 Add translation links to shader errors 2022-01-19 15:16:32 +03:00
Rémi Verschelde 8b8e858778
Merge pull request #54489 from briansemrau/texture-delete-update 2022-01-19 10:10:54 +01:00
Rémi Verschelde 74b110a736
Merge pull request #56825 from bruvzg/macos_fix_fullscr_multiwindow 2022-01-19 10:03:17 +01:00
Samuel Pedrajas fcc9f5ce39
Add new scaling modes for splash screen
Removes the `fullsize` option which is superseded by `stretch_mode`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-01-18 23:29:11 +01:00
Rémi Verschelde 01eefa2c50
Merge pull request #56761 from Calinou/sdfgi-allow-any-number-of-cascades 2022-01-18 16:21:39 +01:00
Yuri Roubinsky 366d3930ac
Merge pull request #56893 from Chaosus/shader_unify_vardecl 2022-01-18 14:13:56 +03:00
bruvzg d62ca0c9c0 Window management improvements.
[macOS] Fix transient windows not working in the full-screen mode.
[macOS] Fix moving transient windows to the other screen than parent window.
[macOS] Fix popup menu switch on hover.
[macOS] Use content origin rect for windows position (to ensure `DS.mouse_get_position` is equal to `DS.window_get_position` + mouse position from the input events).
[macOS] Fix incorrect input coordinates, when external display with different scaling in connected/disconnected.
[macOS/Windows] Fix moving fullscreen windows between the screens.
Add auto refocusing of the parent window, when the focused transient window is closed.
Remove redundant `DS.mouse_get_absolute_position` function (returns mouse position in the screen coordinates, same as `DS.mouse_get_position`).
2022-01-18 11:47:03 +02:00
Yuri Roubinsky 36a82c8c69 Unify variable and array declarations in shaders 2022-01-18 12:42:39 +03:00
clayjohn ba431a9306 Fix volumetric fog memory leak on resize 2022-01-17 21:30:48 -08:00
Hugo Locurcio 2dc7b03a82
Allow using between 1 and 8 cascades for SDFGI
This provides more flexibility between performance and quality
adjustments, especially when using SDFGI for small-scale levels
(which can be useful for procedurally generated scenes).
2022-01-17 16:49:02 +01:00
Rémi Verschelde 57ad84537d
Merge pull request #56860 from bruvzg/icu_case 2022-01-17 14:28:38 +01:00
Rémi Verschelde 8bdef23f7f
Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00
bruvzg e02a097280
[TextServer] Implement locale and context sensitive case conversion functions. 2022-01-17 14:23:36 +02:00
Haoyu Qiu 7870cf24f2 Fix invalid read when using LightOccluder2D 2022-01-17 16:02:26 +08:00
Hugo Locurcio d6c7d4ab5d
Fix visible background line in intersections in screen-space reflections
Adjusting the step grading by one resolves the issue without affecting
performance or introducing adverse artifacts.
2022-01-16 18:08:07 +01:00
Rémi Verschelde a27b85378b
Merge pull request #56309 from Calinou/remove-pvrtc-support 2022-01-16 11:15:34 +01:00
clayjohn abd0003e4c Remove mistakenly added push constant from SSR 2022-01-15 17:03:55 -08:00
Yuri Roubinsky 08208406ca Refactor size expression parsing for arrays in the shaders 2022-01-15 15:47:39 +03:00
Hugo Locurcio 40be15920f
Remove support for PVRTC texture encoding and decoding
On the only platform where PVRTC is supported (iOS),
ETC2 generally supersedes PVRTC in every possible way. The increased
memory usage is not really a problem thanks to modern iOS' devices
processing power being higher than its Android counterparts.
2022-01-14 21:08:22 +01:00
bruvzg 89f37d4105
Add support for getting native display, window, and view handles. 2022-01-14 13:36:32 +02:00
Yuri Roubinsky 0845b25497 Fix shader crashing when declaring matrix or array varyings 2022-01-14 10:37:39 +03:00
luz paz 858bcd5058 Fix various typos
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
Yuri Roubinsky 4201af6649 Fix completion for global constants in shaders 2022-01-13 19:52:06 +03:00
Yuri Roubinsky c377891145 Add completion for shader_type 2022-01-13 18:37:13 +03:00
Yuri Roubinsky b0356bcb72 Prevent redefinition of main functions in shader 2022-01-13 15:12:35 +03:00
Rémi Verschelde a987ebfde2
Merge pull request #56714 from bruvzg/fix_alignment_break_overrun 2022-01-13 10:20:02 +01:00
bruvzg baec983d8a
[TextServer] Improvements for line breaking, "Fill" alignment, overrun, and interaction between these modes.
Fix "Fill" alignment processing wrong side of the text if overrun trim was applied.
Improve "Fill" alignment to avoid adding excessive subsequent spaces or elongations.
Add font detection to the overrun, to correctly add ellipsis (was using last glyph font, which doesn't necessary have dot character).
Improve line breaking to avoid adding excessive subsequent soft break points for languages without word separator.
Port missing overrun/justification code to the Fallback text server.
Fix inferred text direction detection by controls.
Add tests for "Fill" alignment and line breaking glyph flags.
2022-01-13 08:53:28 +02:00
clayjohn 9b1f242feb Fix cannot use gaussian blur error 2022-01-12 21:58:37 -08:00
Rémi Verschelde 586a973b6b
Merge pull request #56169 from dkaste/fix-clip-rects
Fix canvas items being drawn outside clip rects
2022-01-12 23:59:42 +01:00
Rémi Verschelde 585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Yuri Roubinsky 422f7b280f Optimize include files to improve `shader_language.h` compilation speed 2022-01-12 14:19:12 +03:00
Rémi Verschelde bfd0afca58
Merge pull request #55656 from clayjohn/GLSL3-compiler 2022-01-12 11:33:48 +01:00
Rémi Verschelde 189662e5bd
Merge pull request #56696 from AnilBK/use-init-lists 2022-01-12 10:04:45 +01:00
clayjohn 99064d57db New OpenGL batching canvas renderer 2022-01-11 22:26:18 -08:00
Anilforextra 6c3a0460a8 Use List Initializations for Vectors. 2022-01-12 10:15:12 +05:45
Rémi Verschelde d40d86b959
Merge pull request #56667 from Ice-Cube69/fix_incorrect_property_types 2022-01-11 14:34:18 +01:00
Arnav Vijaywargiya 0c46f73b5e Fixed incorrect property types 2022-01-11 17:17:11 +05:30
Rémi Verschelde 267bee934a
Merge pull request #56416 from BastiaanOlij/fix_xr_viewport_size_overrule
Fix XR viewport size overrule and incorrect usage of internal size
2022-01-11 08:44:36 +01:00
Rémi Verschelde 04fa320650
Merge pull request #56627 from Chaosus/shader_better_limit_warning 2022-01-10 14:06:54 +01:00
Darren Kaste b0d9e14155 Fix canvas items being drawn outside clip rects 2022-01-09 18:15:46 -05:00
bruvzg c89c515ccf
[TextServer] Improve ligature cursor handling.
Fix mid-grapheme hit test.
Fix OpenType features property handling, add default features override option.
Enable mid-grapheme cursor by default.
2022-01-09 19:03:48 +02:00
Yuri Roubinsky bd61d8f80c Enhances a shader uniform limit warning 2022-01-08 21:44:37 +03:00
Anilforextra c9f5d88f3a Use fill() to fill an entire image instead of setting pixels individually. 2022-01-08 17:43:15 +05:45
Rémi Verschelde 9e97262132
Merge pull request #56170 from Calinou/renderingserver-expose-gi-half-resolution 2022-01-07 00:05:43 +01:00
Rémi Verschelde 5e7faed078
Merge pull request #56540 from Calinou/renderingserver-expose-ssil-quality
Expose RenderingServer SSIL quality setter methods
2022-01-06 20:26:59 +01:00