Commit graph

3564 commits

Author SHA1 Message Date
bruvzg
2980c0d60c
HarfBuzz: Update to version 5.1.0, use new FLAG_SAFE_TO_INSERT_TATWEEL flag to improve justification. 2022-08-04 09:10:16 +03:00
Rémi Verschelde
036258b1e9
Merge pull request #61918 from KoBeWi/static_body
Add static methods to create RayQueryParameters
2022-08-04 07:37:32 +02:00
Hugo Locurcio
d2271eb300
Improve error message when the requested V-Sync mode cannot be used 2022-08-04 00:15:09 +02:00
Rémi Verschelde
2c0c76c415
Merge pull request #61851 from Calinou/particles-default-global-coordinates 2022-08-03 11:38:23 +02:00
Rémi Verschelde
b27f06550c
Merge pull request #51531 from Calinou/decal-projector-add-nearest-mipmap-aniso 2022-08-03 11:37:28 +02:00
Rémi Verschelde
15fdf7bc86
Merge pull request #58611 from Calinou/ssr-fix-blend-margin
Fade screen-space reflection towards inner margin
2022-08-03 07:54:59 +02:00
Yuri Rubinsky
988041b74c
Merge pull request #63847 from Zylann/shader_switch_uint 2022-08-03 08:05:19 +03:00
Hugo Locurcio
d041ca6c02
Add Nearest Mipmap Anisotropic filter option to decals and projectors
This is consistent with the BaseMaterial3D filtering options.
It can be used for high-quality pixel art textures that remain sharp
when viewed at oblique angles, but prevents them from becoming grainy
thanks to mipmaps.
2022-08-03 03:49:15 +02:00
Hugo Locurcio
d38671827b
Fade screen-space reflection towards inner margin
- Fade reflection towards inner margin and clip it at screen edges
  instead of external margin.
- Round edges of the fade margin if both are being cut off to prevent
  sharp corners.

Co-authored-by: puchik <puchik@users.noreply.github.com>
2022-08-03 01:55:42 +02:00
Marc Gilleron
779a5cd34a Allow shading language to use switch statement with uints 2022-08-02 23:08:41 +01:00
Hugo Locurcio
84076513b1
Use global coordinates for particles by default
Particles won't move or rotate anymore with the node (or its parents)
by default. This new default behavior is generally more suited
to most use cases. Local coordinates can still be enabled on a per-node basis.

This affects both 2D and 3D particles, and both CPU and GPU-based particles.
2022-08-02 23:25:02 +02:00
Rémi Verschelde
f450f242b9
Merge pull request #62639 from Calinou/line-antialiasing-decrease-feather-width 2022-08-02 21:00:01 +02:00
Patrick Exner
fe5901310e Add spatial built-ins (camera-pos, object-pos, camera-eye etc.) 2022-08-02 17:30:41 +02:00
bruvzg
4373a0bb86
[TextServer] Add ICU Unicode security and spoofing detection. 2022-08-02 15:37:49 +03:00
Rémi Verschelde
b7346e5025
Merge pull request #53956 from bruvzg/icu_uax_31 2022-08-02 08:54:19 +02:00
bruvzg
5aa48b6ae5
[TextServer] Implement ICU/UAX 31 based is_valid_identifier function. 2022-08-02 08:30:20 +03:00
Rémi Verschelde
8cce479c01
Merge pull request #51672 from Calinou/shader-add-hint-transparent-texture
Add `hint_transparent` to use a transparent black placeholder texture
2022-08-02 07:15:59 +02:00
Rémi Verschelde
bda2274969
Merge pull request #63627 from and-rad/vector-field-attractor-fix
Fix vector field particle attractor texture sampling
2022-08-02 07:13:04 +02:00
Rémi Verschelde
2cdef4d532
Merge pull request #63589 from RandomShaper/sdfgi_debug_pc
Keep SdfgiDebug shader's push constant size <= 128
2022-08-02 07:11:58 +02:00
Rémi Verschelde
8de2cc04a7
Merge pull request #63793 from RandomShaper/fix_unbound_resource
Fix uniform set creation error due to null RID
2022-08-02 07:10:20 +02:00
Hugo Locurcio
813f6a5d57
Add hint_transparent to use a transparent black placeholder texture
This can be used in shaders to avoid the need to supply a transparent
placeholder texture manually.
2022-08-01 23:38:06 +02:00
Rémi Verschelde
67c5741c03
Merge pull request #63767 from kubecz3k/fix/headless-collision 2022-08-01 22:04:09 +02:00
Pedro J. Estébanez
2df767d31e Fix uniform set creation error due to null RID 2022-08-01 21:59:13 +02:00
Yuri Rubinsky
9ec6de1767
Merge pull request #63766 from Chaosus/fix_shader_instance_uniform 2022-08-01 15:04:54 +03:00
Yuri Rubinsky
81c44718ca Fix passing values to the instance uniforms in the shader 2022-08-01 13:45:29 +03:00
Jakub Grzesik
3c55637459 fix for headless collision shape generation
this commit implements just enough of dummy mesh_storage so collision shapes are still generated in the headless mode
implementation was inspired by rasterizer_dummy.h from Godot3
2022-08-01 12:38:07 +02:00
Rémi Verschelde
121d6fdace
Merge pull request #63754 from BastiaanOlij/storage_struct_private
Changed storage structs to private
2022-08-01 09:37:36 +02:00
Rémi Verschelde
de53e91b85
Merge pull request #55276 from Calinou/volumetric-fog-tweak-default-gi-inject
Tweak default fog settings for better appearance
2022-08-01 07:55:53 +02:00
Rémi Verschelde
677f565ce8
Merge pull request #63587 from clayjohn/specular-occlusion
Treat specular less than 0.02 as occlusion
2022-08-01 07:54:57 +02:00
Bastiaan Olij
81c6f73109 Changed storage structs to private 2022-08-01 11:59:14 +10:00
Hugo Locurcio
e35e79b802
Tweak default fog settings for better appearance
- Increase the default non-volumetric fog density to 0.01 to make
  adjustments more visible.
- Use a less saturated non-volumetric fog color by default
  (a mix of the sky and horizon colors of the new default
  ProceduralSkyMaterial).
- Set Volumetric Fog Gi Inject to 1.0 by default. Injecting GI results
  in more realistic appearance of volumetric fog, at a very low
  performance cost.
2022-08-01 02:04:20 +02:00
clayjohn
0c65ed38a6 Treat specular less than 0.02 as occlusion
This is a very common hack used in almost all PBR renderers to allow removing specular contribution in dielectric materials
2022-07-31 15:45:21 -07:00
Hugo Locurcio
a0795b4347
Tweak VoxelGI defaults for better quality
Overall brightness is similar to the previous settings, but lighting
now fades off more naturally and reflections feature indirect lighting.
Performance is identical.

- Enable Use Two Bounces by default.
- Decrease Propagation to 0.5 to compensate for the second bounce.
2022-07-31 18:05:24 +02:00
smix8
30c6fff214 Fix Navigation Debug always enabled
Fixes that Navigation Debug is always enabled in debug builds even while "Visible Navigation" is turned off.
2022-07-31 05:44:39 +02:00
Hugo Locurcio
0e26fee3b7
Make Decal's modulate property affect emission color as well
This can be used to recolor special effects such as fake area fog
without having to create separate textures for each color.

- Improve the Decal class documentation.
2022-07-30 21:41:48 +02:00
LinuxUserGD
6e6569aa78 fix 'Comparison result is always the same' warnings 2022-07-29 19:45:22 +02:00
Rémi Verschelde
7199314eb3
Merge pull request #63595 from reduz/remove-signal-connect-binds
Remove Signal connect binds
2022-07-29 18:10:39 +02:00
Rémi Verschelde
5352cf8e2f
Merge pull request #46557 from asmaloney/remove-impossible-condition
Remove impossible condition in RenderingServer::mesh_surface_make_offsets_from_format
2022-07-29 16:56:48 +02:00
Andreas Raddau
dfc6035ce1 Fix vector field particle attractor texture sampling 2022-07-29 16:52:54 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Pedro J. Estébanez
278950f731 Keep SdfgiDebug shader's push constant size <= 128 2022-07-29 13:25:11 +02:00
Rémi Verschelde
8b454f8b41
Merge pull request #62601 from smix8/navigation_3d_debug_4.x 2022-07-29 12:29:32 +02:00
smix8
c394ea518e Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
2022-07-29 09:58:41 +02:00
Rémi Verschelde
2bf8c4a6d0
Merge pull request #63527 from BastiaanOlij/rework_environment
Restructure environment in render implementation
2022-07-29 08:05:40 +02:00
Bastiaan Olij
f579125eeb Restructure environment in render implementation 2022-07-29 12:24:32 +10:00
Rémi Verschelde
8e0f328a80
Merge pull request #59840 from Calinou/renderingserver-global-uniform-rename 2022-07-28 20:34:17 +02:00
Rémi Verschelde
1c820f19b1
Merge pull request #60957 from DeeJayLSP/sample_pcm 2022-07-28 19:51:08 +02:00
DeeJayLSP
4889659227 Rename AudioStreamSample to a more discoverable name 2022-07-28 13:53:36 -03:00
Hugo Locurcio
4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
Hugo Locurcio
e24029edc3
Allow changing mipmap LOD bias when FSR 1.0 scaling is not used
Mipmap LOD bias can be useful to improve the appearance of distant
textures without increasing anisotropic filtering (or in situations
where anisotropic filtering is not effective).

`fsr_mipmap_bias` was renamed to `texture_mipmap_bias` accordingly.
The property hint now allows for greater precision as well.
2022-07-28 17:51:13 +02:00
Rémi Verschelde
82811367cb
Merge pull request #63571 from RandomShaper/conservative_validate_vrs 2022-07-28 15:34:47 +02:00
Pedro J. Estébanez
5f71b55380 Improve handling of the format of the VRS image
- Validate format conservatively. (This is to have VRS images created regardless whether VRS attachments are supported, which avoids errors in places where the code assumes such images were created on low-spec GPUs.)
- Create a non-layered default VRS image, which is what Vulkan (and D3D12, by the way) expect.
2022-07-28 12:24:03 +02:00
Rémi Verschelde
199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Bastiaan Olij
1dd671014b Add startup flag to override XR mode settings 2022-07-28 11:50:34 +10:00
Hugo Locurcio
aaeb60eafc
Add a Movie Quit On Finish property to AnimationPlayer
This quits the project when an animation is done playing in the
given AnimationPlayer, but only in Movie Maker mode.
When this happens, a message is printed with the absolute path of the
AnimationPlayer node that caused the engine to quit.

This can be used to create videos that stop at a specified time
without having to write any script.

A report is now also printed to the console when the video is done
recording (as long as the engine was exited properly).
This report is unfortunately not always visible in the editor's
Output panel, as it's printed too late.

A method was also added to get the path to the output file from the
scripting API.
2022-07-27 18:50:28 +02:00
Rémi Verschelde
bb94e16bd8
Merge pull request #63406 from Zylann/init_viewport_fields 2022-07-27 12:29:05 +02:00
Rémi Verschelde
a7335b00e6
Merge pull request #62362 from clayjohn/VULKAN-halo 2022-07-27 11:17:34 +02:00
Rémi Verschelde
cade90a807
Merge pull request #58296 from Calinou/decal-distance-fade-tweak-defaults 2022-07-27 09:44:47 +02:00
Rémi Verschelde
d5ec1a9650
Merge pull request #63477 from Chaosus/shader_fix_fog 2022-07-27 09:35:30 +02:00
clayjohn
7e7c6995e3 Use full size mipmaps for reflections when in high-quality mode 2022-07-26 23:53:05 -07:00
Yuri Rubinsky
05bc55b2ad
Merge pull request #63522 from Chaosus/shader_fix_projection 2022-07-27 09:38:14 +03:00
Rémi Verschelde
e8309d49e0
Merge pull request #63345 from BastiaanOlij/split_geometry_instance
Cleanup RendererSceneRender::GeometryInstance
2022-07-27 08:28:24 +02:00
Yuri Rubinsky
2dc59a3eea Fix incorrect conversion of default value for mat4 uniform in shaders 2022-07-27 09:06:18 +03:00
Yuri Rubinsky
bbf76faf86 Fix FOG built-in in spatial/fragment shader 2022-07-27 08:31:06 +03:00
Bastiaan Olij
0bd042c601 Change RendererSceneRender::GeometryInstance so more code is shared among renderers 2022-07-27 12:32:07 +10:00
Hugo Locurcio
a151a74a98
Tweak Decal distance fade defaults and add property hints
The new default values are more usable in real world scenarios
when smooth fading of distant decals is desired for performance reasons.

The Decal distance fade property hints were adjusted based on the
GeometryInstance3D visibility range fade property hints. `or_greater`
was also added to allow specifying larger values if needed.
2022-07-27 03:15:46 +02:00
Hugo Locurcio
d1716c2e7a
Change window title in Movie Maker mode to display useful information
The frame number and movie time is now displayed in the window
title. This way, you can see how quickly the video recording is advancing
in real-time (and perhaps tweak your settings if it's going too slow).
2022-07-26 18:59:33 +02:00
Rémi Verschelde
2d2b85d400
Merge pull request #62972 from Chaosus/shader_groups
Implement shader uniform groups/subgroups
2022-07-26 15:16:33 +02:00
Rémi Verschelde
f94b4dbe22
Merge pull request #63236 from halgriffiths/fix-texture-rect-transpose
send FLAGS_TRANSPOSE_RECT to Vulkan
2022-07-26 13:22:32 +02:00
Yuri Rubinsky
886c2d9681 Implement shader uniform groups/subgroups 2022-07-26 11:26:09 +03:00
Bastiaan Olij
bad5c659a4 Move Sky(RD) into environment
Move Fog logic from render scene render to fog
2022-07-26 10:19:40 +10:00
Juan Linietsky
c7255388e1 Remove ThreadWorkPool, replace by WorkerThreadPool
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
2022-07-25 15:39:50 +02:00
Rémi Verschelde
49b0aa93e3
Merge pull request #63424 from Chaosus/shader_preprocessor_inc_fix 2022-07-25 14:56:06 +02:00
Yuri Rubinsky
be3fb7a216 Fix errors when using built-ins in shaderinc 2022-07-25 12:33:04 +03:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Rémi Verschelde
3084a48ace
Merge pull request #63219 from reduz/implement-vector4-projection 2022-07-25 11:13:27 +02:00
Marc Gilleron
5690f47135 Initialize default values for viewports in rendering server.
Example with TAA: by default it is `false` in project settings and in
the Viewport node. When the scene tree is created, Viewport.set_use_taa()
is called with the value from ProjectSettings. But because the default
values are already the same, RenderingServer isn't called.
The Viewport struct in the RenderingServer does not initialize this field,
so TAA gets randomly enabled when the game starts with default settings.
2022-07-24 21:39:06 +01:00
reduz
455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Rémi Verschelde
a5bc65bbad
Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
2022-07-23 11:21:14 +02:00
Yuri Rubinsky
6d992abb54 Fix some errors after shader preprocessor PR 2022-07-23 09:38:59 +03:00
reduz
d1ddee2258 Implement BPM support
Based on #62896, only implements the BPM support part.

* Implements BPM support in the AudioStreamOGG/MP3 importers.
* Can select BPM/Bar Size and total beats in a song file, as well as edit looping points.
* Looping is now BPM aware
* Added a special importer UI for configuring this.
* Added a special preview showing the audio waveform as well as the playback position in the resource picker.
* Renamed `AudioStream::instance` to `instantiate` for correctness.
2022-07-23 07:31:17 +02:00
Rémi Verschelde
fe929d4787
Merge pull request #62513 from reduz/shader_preprocessor_remake 2022-07-23 00:02:33 +02:00
Rémi Verschelde
4f7bfacfcd
Merge pull request #62478 from BastiaanOlij/split_effects_20220628 2022-07-22 23:44:52 +02:00
reduz
f649678402 Clean up Shader Preprocessor
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
Yuri Roubinsky
7b94603baa Adding shader preprocessor support
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-22 22:51:57 +02:00
halgriffiths
d37ebc2bdc send FLAGS_TRANSPOSE_RECT to Vulkan 2022-07-22 13:49:04 +01:00
luz paz
38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
Bastiaan Olij
eefcb5ed67 Move screen space effects into a separate class 2022-07-19 13:27:39 +10:00
Rémi Verschelde
abe8b88702
Merge pull request #62834 from RandomShaper/fix_vk_sky_error
Bind correct default resource type in GI
2022-07-18 23:39:21 +02:00
Rémi Verschelde
d29e17d9d2
Merge pull request #63057 from sakrel/vulkan-fix-2d-shadows 2022-07-18 21:53:12 +02:00
Rémi Verschelde
9276c65522
Merge pull request #62265 from d-robbins/specular_shininess_used 2022-07-18 21:35:46 +02:00
Rémi Verschelde
5bea531228
Merge pull request #62848 from RandomShaper/shader_writability_improvement 2022-07-18 15:11:42 +02:00
Pedro J. Estébanez
4ac2008782 Make SDFGI direct light shader follow the same-writability rule 2022-07-18 14:46:29 +02:00
David R
c2b0a873c2 added usage_defines for SPECULAR_SHININESS
added usage defines for opengl3 renderer
2022-07-18 00:45:42 +02:00
Bastiaan Olij
d139131aab Adding Variable Rate Shading support to Godot
Improve GI renderer and add VRS support
Implement render device has_feature and move subgroup settings to limit_get
2022-07-17 15:42:24 +10:00
Fabian Keller
2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
sakrel
16a8967757 Fix DirectionalLight2D and PointLight2D shadows not rendering correctly 2022-07-15 23:55:15 +02:00
bruvzg
cbe3a2dcb7
Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API. 2022-07-15 08:49:50 +03:00
Rémi Verschelde
5fec0d232a
Merge pull request #58763 from Calinou/editor-fix-default-float-step 2022-07-14 00:21:33 +02:00
Rémi Verschelde
7e49c8c30e
Merge pull request #62947 from BastiaanOlij/fix_mesh_instance_free 2022-07-14 00:05:25 +02:00
Hugo Locurcio
21ea1c3835
Rename soft shadow quality project settings for easier searching
`rendering/quality/shadows` is now `rendering/quality/positional_shadow`
to explicitly denote that the settings only affect positional light shadows,
not directional light shadows.

Shadow atlas settings now contain the word "atlas" for easier searching.

Soft shadow quality settings were renamed to contain the word "filter".
This makes the settings appear when searching for "filter" in the
project settings dialog, like in Godot 3.x.
2022-07-13 19:56:02 +02:00
Bastiaan Olij
6930ad2777 Fix typo, call mesh_instance_free not mesh_free 2022-07-12 22:30:08 +10:00
Hugo Locurcio
75f7e1fbf8
Fix some properties having an invalid float step of 0
This also clamps the float step in the editor to the lowest value
that is guaranteed to work in all situations (including for 32-bit
floats).
2022-07-10 22:56:59 +02:00
Hugo Locurcio
0f18bd244e
Fix dead link in TAA resolve shader comment
Spartan Engine has recently removed its own internal TAA in favor
of FSR 2.0. The link has been changed to point to a fixed commit,
so the link will keep working as long as the repository exists.
2022-07-09 22:51:54 +02:00
Pedro J. Estébanez
ba39230ef3 Bind correct default resource type in GI 2022-07-08 19:07:28 +02:00
Xentripetal
f514b82fd3 Account for relative z-indexes when y-sorting 2022-07-08 09:18:00 -05:00
Rémi Verschelde
99df193bea
Merge pull request #62277 from RandomShaper/depth_buffer_no_sampling
Rationalize certain cases of texture usage flags
2022-07-08 11:34:09 +02:00
Rémi Verschelde
1e553e34fb
Merge pull request #62108 from bruvzg/font_config_v3 2022-07-07 12:22:49 +02:00
Yuri Rubinsky
3dc1a1dbfb Prevent possible crash when mesh is freed 2022-07-06 19:52:54 +03:00
lawnjelly
1f69666209 Remove Octree
Octree is no longer used in 4.x.
2022-07-06 14:10:05 +01:00
Rémi Verschelde
55fca1cb94
Merge pull request #62344 from BastiaanOlij/extract_dependencies 2022-07-06 13:24:46 +02:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
Hugo Locurcio
c9037a8d2c
Remove unused anisotropy setter/getter methods in VoxelGI
These methods weren't exposed to the scripting API.

Anisotropy was used in earlier iterations of VoxelGI, but it was
removed as it was too expensive.
2022-07-06 02:40:49 +02:00
Hugo Locurcio
cf1ce8494d
Improve antialiased line drawing sharpness and respect of original width
Antialiased lines with a width of 2 pixels or more now use a smaller
feather width of 1.25 instead of 2.0. This makes them look sharper
and better preserves their original shape while still having good
antialiasing quality.

This also improves the appearance of thin antialiased lines by
slightly increasing their feather size (from 1.0 to 1.25). It
makes them appear a tad thicker, but the antialiasing quality is
much improved by doing this.
2022-07-02 18:45:42 +02:00
Rémi Verschelde
6bbfd160b0 SCons: Properly track codegen script dependency for generated GLSL headers 2022-07-02 16:01:48 +02:00
Hugo Locurcio
f9e6b292e2
Remove debugging print following GI reorganization 2022-07-01 20:08:10 +02:00
clayjohn
93c82ab4b9 Evaluate specular reflections using specular dominant direction instead of assuming mirror reflections 2022-06-29 23:36:18 -07:00
Hugo Locurcio
aa177fc4db
Split MovieWriterPNGWAV into its own file
This makes its organization consistent with MovieWriterMJPEG.
2022-06-30 01:02:28 +02:00
Rémi Verschelde
2d28bb8364
Merge pull request #62482 from JFonS/fix_crash_canvas_mode 2022-06-28 15:31:51 +02:00
Rémi Verschelde
d53f1fb388
Merge pull request #60935 from Calinou/geometryinstance3d-gi-mode-default-static
Use the Static global illumination mode in GeometryInstance3D by default
2022-06-28 14:40:53 +02:00
JFonS
8102db90bc Fix crash in Environment "Canvas" background mode. 2022-06-28 13:25:18 +02:00
Rémi Verschelde
16d9918b51
Merge pull request #62467 from RandomShaper/descriptor_rw_matters
Consider uniform writability part of the interface of the set
2022-06-28 08:25:38 +02:00
Je06jm
c2550e1cc0 Fixed FSR. Before, it was commiting the
raw render to the screen. Now, it commits
the fsr upscaled image
2022-06-27 18:01:12 -06:00
Pedro J. Estébanez
fc6ac4a155 Consider uniform writability part of the interface of the set 2022-06-27 21:56:18 +02:00
Bastiaan Olij
ecfcfd97fa Split dependency logic
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
Rémi Verschelde
dac79e15f1
Merge pull request #62390 from Calinou/movie-writer-tweak-settings 2022-06-27 12:27:46 +02:00
Pedro J. Estébanez
678a9ca221 Rationalize certain cases of texture usage flags
- Check for exhaustive usage flags for depth buffer
- Remove uneeded storage flag from normal-roughness buffer
2022-06-27 11:28:38 +02:00
Bastiaan Olij
4e8e10a186 Fix typo in roughness shaders 2022-06-26 12:43:21 +10:00
Hugo Locurcio
bdb40c6478
Add property hints to MovieWriter settings
- Rename audio mix rate setting as the suffix is now part of the
  property hint. This is also more consistent with existing mix rate
  project settings.
- Improve the MovieWriter class reference.
- Tweak warning message about audio possibly going out of sync.
2022-06-25 20:08:56 +02:00
Rémi Verschelde
fbb5e24d1e
Merge pull request #62133 from BastiaanOlij/move_cubemap_effects
Moved cube_to_dp and cubemap logic into CopyEffects
2022-06-24 22:27:26 +02:00
Rémi Verschelde
faae24637c
Merge pull request #62300 from smix8/navigation_map_force_update_4.x 2022-06-24 10:13:07 +02:00
Bastiaan Olij
6224b00365 Moved cube_to_dp and cubemap logic into CopyEffects 2022-06-24 18:04:28 +10:00
smix8
e57360d8df Add NavigationServer.region_owns_point() helper function
Adds a helper function to check if a world space position is currently owned by a navigation region.
2022-06-23 23:32:05 +02:00
Hugo Locurcio
610363add0
Use the Static global illumination mode in GeometryInstance3D by default
This makes VoxelGI and SDFGI work out of the box with primitive meshes,
loaded OBJ meshes and CSG nodes.
2022-06-23 22:34:23 +02:00
smix8
fdea269805 Add NavigationServer map_force_update() function
Adds map_force_update() function to NavigationServer. This function immediately flushes the Navigationserver command queue and recalculates all navigationmeshes and region connections for a specific map.
2022-06-23 17:32:07 +02:00
Rémi Verschelde
462127eff0
Merge pull request #62312 from smix8/navigation_get_maps_4.x 2022-06-23 16:14:12 +02:00
Rémi Verschelde
051fb86fb0
Merge pull request #61221 from BastiaanOlij/split_gi_effects 2022-06-23 12:28:10 +02:00
Rémi Verschelde
d1dac8427a
Merge pull request #55846 from ellenhp/fix_ogg_edge_cases
Fix ogg edge cases
2022-06-22 23:33:51 +02:00
Rémi Verschelde
d8ef904ffc
Merge pull request #35758 from zmanuel/eliminate-draw-pending
Remove redundant thread sync counter draw_pending
2022-06-22 18:20:41 +02:00
Rémi Verschelde
e21db7723a
Merge pull request #62286 from JFonS/taa_global_time 2022-06-22 16:59:08 +02:00
Rémi Verschelde
95cafc7bcf
Merge pull request #62305 from JFonS/taa_molten_mobile_workaround 2022-06-22 16:58:31 +02:00
smix8
c0fed1d4e8 Add Navigation function to get all navigation maps
Added new function that returns all created navigation map RIDs from the NavigationServer. The function returns both 2D and 3D created navigation maps as technically there is no distinction between them.
2022-06-22 15:33:40 +02:00
jfons
0f38e79617 Move TIME to a global shader variable
This makes it work consistently for motion vectors in all functions, including user-defined ones.
2022-06-22 12:24:37 +02:00
JFonS
9b4e07f866 Workaround MoltenVK shader conversion error 2022-06-22 11:58:50 +02:00
Bastiaan Olij
997810e417 Split GI effects and fix stereoscopic rendering of GI effects 2022-06-22 12:50:17 +10:00
Rémi Verschelde
40c360b870
Merge pull request #62122 from reduz/implement-movie-writer
Implement a Movie Maker mode
2022-06-21 14:24:14 +02:00
reduz
5786516d4d Implement Running Godot as Movie Writer
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.

This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).

**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).

Usage:

$ godot --write-movie movie.avi [scene_file.tscn]

Missing:

* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-21 11:28:47 +02:00
reduz
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
Hugo Locurcio
2651e88b05
Automatically update the editor viewport when 3D scaling options are changed
This allows for previewing the effects of the various 3D scaling
project settings without having to restart the editor.
2022-06-19 01:05:17 +02:00
Rémi Verschelde
3a2b409c5a
Merge pull request #62106 from BastiaanOlij/eye_offset
Introduce eye_offset for correcting stereoscopic reflections
2022-06-18 10:40:57 +02:00
Bastiaan Olij
b4821fe2e0 Introduce eye_offset for correcting stereoscopic reflections
Use view instead of vertex for reflections.
2022-06-17 19:39:34 +10:00
Marcel Admiraal
3d03330ae6 Cleanup AudioEffectRecord thread_active variable 2022-06-17 08:54:46 +01:00
Rémi Verschelde
285e20d550
Merge pull request #62081 from Calinou/glow-mix-mode-apply-after-fxaa
Fix glow in Mix mode not working correctly when FXAA is enabled
2022-06-16 20:00:32 +02:00
bruvzg
b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
Hugo Locurcio
787a1e006b
Fix glow in Mix mode not working correctly when FXAA is enabled
Glow must be performed after FXAA to ensure correct appearance.
2022-06-15 22:23:56 +02:00
smix8
245da150e7 Streamline Navigation layer function names.
Streamline Navigation layer function names.
2022-06-15 00:18:48 +02:00
clayjohn
a94110d0c6 Remove GLES2 shader constraints from GLES3 2022-06-14 12:01:52 -07:00
Hugo Locurcio
0225c6d31a
Tweak Light3D property hints for greater flexibility
- Specular can now be set above 1.0.
- Blur can be set to 0 to disable shadow blurring entirely, which is useful
  on lights that have a non-zero size.
  - When shadow blurring is disabled, lights that have a non-zero size will
    not use PCSS-like soft shadows, speeding up shadow rendering
    considerably.
- Some property hints now allow more precise values.
2022-06-13 14:31:46 +02:00
Rémi Verschelde
136f84fc35
Merge pull request #61772 from bruvzg/ft_ot_collect 2022-06-13 11:13:05 +02:00
FireForge
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
kobewi
9ada594139 Add static methods to create RayQueryParameters 2022-06-10 23:37:04 +02:00
Yuri Rubinsky
c9ae83b5ab Prevent defining float constant without number after exponent in shaders 2022-06-10 11:35:56 +03:00
Yuri Rubinsky
5dd7a1030d Fix incorrect sky rotation based on camera axis 2022-06-09 22:40:40 +03:00
Yuri Rubinsky
d8842f1a4b Fix TIME compilation for custom functions in spatial shader 2022-06-09 20:12:25 +03:00
jfons
36382ab7eb Workaround MoltenVK error found in TAA implementation 2022-06-09 16:40:00 +02:00
clayjohn
a0338553b5 Assign VIEWPORT_SIZE after validating screen_size to avoid crash when using ReflectionProbe 2022-06-08 15:01:12 -07:00
Rémi Verschelde
e4994e2817
Merge pull request #61739 from smix8/navigation_region_cost_4.x 2022-06-08 16:05:38 +02:00
Rémi Verschelde
48dcafeed9
Merge pull request #61794 from clayjohn/VULKAN-viewport-size
Use RenderBuffer size instead of half extents for VIEWPORT_SIZE
2022-06-08 07:16:25 +02:00
clayjohn
b6649828cd Use RenderBuffer size instead of half extents for VIEWPORT_SIZE in Vulkan spatial shaders 2022-06-07 15:01:20 -07:00
jfons
ba832d83b2 Initial TAA implementation
Initial TAA support based on the implementation in Spartan Engine.

Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
2022-06-07 13:14:44 +02:00
bruvzg
6e4cdad3ac
[TextServer] Adds support for TrueType / OpenType collection files (*.TTC, *.OTC). 2022-06-07 11:35:59 +03:00
smix8
cfdfd304f1 Add NavigationRegion costs for pathfinding
Add NavigationRegion costs for pathfinding.
2022-06-06 15:25:06 +02:00
Rémi Verschelde
361a401fbb
Merge pull request #61554 from Chaosus/shader_fix_hints 2022-06-03 17:26:18 +02:00
reduz
54542ef3ec Change Server initialization order
* Registration of server classes happened after Display initialization.
* This made no sense in practice and avoided the registration of custom server drivers (like custom XR server, custom Rendering server, custom XR server).
* Initialization moved to _before_ Display.
2022-06-01 16:48:28 +02:00
Bastiaan Olij
69b66ec425 Ensure has_os_features is safely called as it can't be called from within the construct of RenderingServerDefault on which it relies 2022-06-01 20:47:32 +10:00
Rémi Verschelde
d8b0a8cd29
Merge pull request #61572 from clayjohn/ssao-license 2022-05-31 18:56:16 +02:00
clayjohn
06f356d41e Add and improve license attribution for SSAO and SSIL shader code 2022-05-31 09:42:50 -07:00
Rémi Verschelde
9f473ec09e
Merge pull request #61480 from Calinou/profiler-physics-add-3d-suffix
Add a 3D suffix to relevant physics profiler categories
2022-05-31 12:26:39 +02:00
Yuri Rubinsky
cf240a7ae0 Refactor shader hints 2022-05-31 11:51:47 +03:00
clayjohn
2ba53547c9 Fix error with !rb spam when using background color mode with reflection probes 2022-05-28 18:11:28 -07:00
Hugo Locurcio
36428305a6
Add a 3D suffix to relevant physics profiler categories
2D physics categories already had a 2D suffix: "Physics 2D"
2022-05-28 00:54:53 +02:00
clayjohn
7b71545652 Remove mesh and particles RD dependencies from canvas rendering server 2022-05-26 10:43:37 -07:00
Rémi Verschelde
20a1b85589
Merge pull request #61425 from clayjohn/GLES3-2D 2022-05-26 01:16:52 +02:00
clayjohn
fb860265e0 Implement 2D Meshes and MultiMeshes in GLES3 backend 2022-05-25 15:46:24 -07:00
Nathan Franke
77c8f271e7
use ERR_FAIL_INDEX when preferred 2022-05-25 13:36:45 -05:00
Hugo Locurcio
e85459dcd1
Add Cone and Cylinder shapes to FogVolume
This complements the existing Ellipsoid and Box local fog shapes.

This can be used to represent a light cone coming from a SpotLight.
2022-05-25 12:35:53 +02:00
GanidhuAbey
3c95a70081 Fix particle system from going inactive early
Prevents particles from freezing and dissapearing by resetting
it's inactive time when particles are emitted.
2022-05-24 17:31:21 -06:00
Rémi Verschelde
12ddaa36a6
Merge pull request #60641 from clayjohn/Sky-ign
Use IGN instead of white noise for sky dithering
2022-05-24 23:34:41 +02:00
clayjohn
3e20c1347d Add clipping, backbuffer, and CanvasGroups to 2D GLES3 renderer
As well as significant consequent cleanup in the RenderTarget, Texture, and Canvas renderer code
2022-05-24 11:00:34 -07:00
clayjohn
4f82b1bd20 Use IGN instead of white noise for sky dithering 2022-05-24 10:57:07 -07:00
Rémi Verschelde
1314e6cbcc
Merge pull request #60803 from Chaosus/shader_hint_rename
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-24 08:15:33 +02:00
Rémi Verschelde
126470caa1
Merge pull request #61226 from Chaosus/shader_fix_keyword_completion 2022-05-23 19:05:29 +02:00
Hugo Locurcio
209d7eb7ea
Fix typo in occlusion culling warning method name 2022-05-23 09:34:28 +02:00
trollodel
fe3371a9a9 Add timestamps to some rendering effects 2022-05-21 17:47:28 +02:00
Rémi Verschelde
a53434639f
Merge pull request #61214 from somnathsarkar/particle-attractor-fix
Fix GPUParticles3D disappearance at attractor origins
2022-05-21 08:48:36 +02:00
Somnath Sarkar
99911bfa79 Fix GPUParticles3D disappearance at attractor origins 2022-05-20 19:56:32 -04:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Yuri Rubinsky
29ff04acf2 Fix incorrect keyword completion after period in shader editor 2022-05-20 18:40:57 +03:00
Windy Darian
a3e016e07e Fix normal and tangent blending in blend shapes 2022-05-20 07:59:45 -04:00
Aaron Franke
5dc3bfb80e
Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Haoyu Qiu
fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Ricardo Buring
f072aa69a9 Add motion parameter to toggle whether recovery is reported as a collision
This makes the intent explicit in each use case.
2022-05-18 16:40:29 +02:00
Yuri Rubinsky
5322b171de Fix tonemapper shader to correctly apply alpha channel 2022-05-18 06:43:07 +03:00
clayjohn
9b61c855ef Add basic lighting to GLES3 renderer.
This includes all three light types and IBL, but does not include shadows or any form of GI
2022-05-16 15:07:09 -07:00
clayjohn
600d8105d8 Fix custom irradiance bug in Vulkan mobile renderer 2022-05-16 11:57:41 -07:00
Rémi Verschelde
f3c0e75fba
Merge pull request #60958 from smix8/navigation_server_rid_utility_4.x 2022-05-16 13:46:49 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Somnath Sarkar
52aeaf5d16 Fix computation of screen_uv 2022-05-16 00:00:01 -04:00
Rémi Verschelde
349aa9c884
Merge pull request #60894 from derammo/derammo_opengl3_windows 2022-05-13 15:07:13 +02:00
Bastiaan Olij
fe8c8eeba8 Copy_to_fb is available in both raster and clustered renderers, remove unwanted checks 2022-05-13 13:19:42 +10:00
Rémi Verschelde
9cf9054c3e
Merge pull request #60976 from Calinou/fsr-rename-property-hint 2022-05-12 23:12:03 +02:00
Rémi Verschelde
ff30a09993
Merge pull request #60643 from clayjohn/GLES3-3D 2022-05-12 21:08:02 +02:00
smix8
371054e3e5 Add NavigationServer2D/3D API functions to find missing RID info
Utility functions for NavigationServer2D/3D to find missing RID information when working with Server API directly. e.g. from map to regions and agents, from agent or region to map, from region to map and agents and so on ....

Requirement to work with NavigationServer API exklusive without SceneTree nodes and when juggling agents and regions between multiple navigation maps.
2022-05-12 20:23:19 +02:00
clayjohn
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
Hugo Locurcio
0cdd7d88ad
Rename remaining references of FSR to FSR 1.0
With FSR 2.0 around the corner, we should avoid any ambiguity by
explicitly stating the version number.
2022-05-12 18:22:43 +02:00
reduz
8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
clayjohn
2bf8831dd6 SceneShader compiling 2022-05-11 21:00:21 -07:00
clayjohn
3bb8e6a9fe SkyShaders working 2022-05-11 21:00:21 -07:00
derammo
96c21bc749 opengl3 driver now works on windows including multi window
fixed and simplified gl_manager_windows
swap buffers now called for all windows
fixed missing pixel format setting in additional windows
    this makes them work in OpenGL contexts
changed verbose error printing to write once
    this error message happens very frequently while opengl3 is not finished
removed dead code no longer needed after changes
fixed comments that were misinformation
window messages during window creation now handled
    these were previously discarded
    messages now tunnel the required context
changed failure to create opengl3 window on windows to be more fatal
marked a problem with pen code
conditional compilation of vulkan and opengl3 on windows fixed
windows debug builds now show messages on debug console also
rendering driver selection box now shows only compiled drivers
marked some problematic code
thanks to akien-mga for patiently rewriting my style mistakes
2022-05-11 16:12:40 -04:00
Bastiaan Olij
9939cfc4c4 Split out bokeh_dof and copy effects 2022-05-11 11:08:56 +10:00
Rémi Verschelde
d8935b27a9 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.
2022-05-10 13:03:13 +02:00
Yuri Roubinsky
a8bbe570ca Rename hint_albedo, hint_white/black in shaders 2022-05-09 22:50:18 +03:00
Yuri Roubinsky
8ed84a9f01 Fix instance uniform shader crash in custom functions 2022-05-09 17:10:42 +03:00
Hugo Locurcio
79be2c7b75
Rename profiler "Idle Time" to "Process Time"
References to "idle time" are progressively being replaced by
"process time" throughout the engine to avoid confusion.
2022-05-05 20:23:47 +02:00
Rémi Verschelde
8fb02635d4
Merge pull request #60772 from MightiestGoat/multimesh-uniform-set
Fix the uniform set creation of multimesh with a invalidated buffer
2022-05-05 16:55:48 +02:00
mightygoat
61df370810 Check multimesh before uniform set creation 2022-05-05 12:25:02 +05:30
mightygoat
10209e31eb Fix the uniform set creation of multimesh with a invalidated buffer 2022-05-05 06:59:47 +05:30
Rémi Verschelde
477b53d280
Merge pull request #60568 from Chaosus/shader_keyword_completions
Add keyword completion to shader editor
2022-05-04 23:27:33 +02:00
Rémi Verschelde
c114823471
Merge pull request #58298 from Calinou/decal-distance-fade-use-easing 2022-05-04 21:50:20 +02:00
Rémi Verschelde
84f64ddde9
Merge pull request #60723 from reduz/refactor-module-initialization 2022-05-04 19:08:43 +02:00
reduz
de0ca3b999 Refactor module initialization
* Changed to use the same stages as extensions.
* Makes the initialization more coherent, helping solve problems due to lack of stages.
* Makes it easier to port between module and extension.
* removed the DRIVER initialization level (no longer needed).
2022-05-04 17:34:51 +02:00
Aaron Franke
fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
Rémi Verschelde
6530d46d67
Merge pull request #51102 from Calinou/renderingserver-add-api-version-getter
Add `get_video_adapter_api_version()` to RenderingServer
2022-05-03 14:44:55 +02:00
Rémi Verschelde
931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Rémi Verschelde
297241f368
Merge pull request #60714 from Calinou/typedef-remove-ref
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
2022-05-03 14:28:18 +02:00
Rémi Verschelde
3894b08d0d
Merge pull request #60553 from madmiraal/separate-display_safe_area 2022-05-03 11:20:46 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Hugo Locurcio
31194f5b1c
Add get_video_adapter_api_version() to RenderingServer
This method can be used to get the graphics API version currently in
use (such as Vulkan). It can be used by projects for troubleshooting
or statistical purposes.
2022-05-03 01:18:35 +02:00
Hugo Locurcio
618c88c71b
Make Decal distance fade smoother
`smoothstep()` avoids the sudden transparency jump when entering or
leaving a decal's distance 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-05-02 23:14:00 +02:00
Rémi Verschelde
7f181494d1
Merge pull request #60705 from awsker/fix-viewport-clearing
Viewport would be cleared even when clear_mode was set to never clear
2022-05-02 21:25:42 +02:00
Rémi Verschelde
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
awsker
9522419e97 Viewport would be cleared even when clear_mode was set to VIEWPORT_CLEAR_NEVER 2022-05-02 11:03:39 +02:00
Marcel Admiraal
97e87a2daf Fix screen_get_usable_rect returning display safe area 2022-05-02 09:31:32 +02:00
Rémi Verschelde
bc7ccc909b
Merge pull request #60551 from madmiraal/implement-3466
Add a method for obtaining display cutouts on Android
2022-05-02 07:56:41 +02:00
Yuri Rubinsky
c25c837f21
Merge pull request #60682 from Chaosus/shader_vec3_hint_color 2022-05-01 11:23:42 +03:00
Yuri Roubinsky
5eb3a0ef4a Add hint_color support for vec3 in shaders 2022-05-01 09:47:35 +03:00
clayjohn
623753a3a2 Use linear mipmap sampling in ToneMapper 2022-04-30 21:30:08 -07:00
Aaron Franke
1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
Aaron Franke
b831fb0a54
Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
Yuri Roubinsky
15032e01e6 Add keyword completion to shader editor 2022-04-29 08:40:43 +03:00
bruvzg
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
Markus Sauermann
a793960a10 Fix cppcheck const parameters
Convert method signature parameters to const where it is possible

# Conflicts:
#	drivers/gles3/rasterizer_canvas_gles3.cpp
#	drivers/gles3/rasterizer_canvas_gles3.h
#	editor/plugins/animation_state_machine_editor.cpp
#	editor/plugins/animation_state_machine_editor.h
2022-04-28 11:35:39 +02:00
Rémi Verschelde
cab171c54e
Merge pull request #60547 from BastiaanOlij/split_tonemapper_effect
Splitting tonemapper into its own class
2022-04-28 08:33:44 +02:00
Bastiaan Olij
3b2267ba6d Splitting tonemapper into its own class 2022-04-28 15:00:30 +10:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Aaron Franke
0ae00a07d6
Rename variable names for some singletons 2022-04-26 22:53:50 -05:00
Hugo Locurcio
eb497bbaa7
Fix "ortogonal" -> "orthogonal" typo in rasterizer code 2022-04-26 21:49:44 +02:00
Marcel Admiraal
71ce5857ec Add a method for obtaining display cutouts on Android 2022-04-26 13:51:21 +02:00
Yuri Roubinsky
643e75bea9 Prevent shader crash when using precision on boolean types 2022-04-26 12:30:24 +03:00
NNesh
2f33414dab Fix clearing backbuffer if there are no items 2022-04-25 22:31:40 +05:00
Rémi Verschelde
fbfecc1dea
Merge pull request #60407 from JFonS/fix_color_pass_lm 2022-04-25 16:03:08 +02:00
bruvzg
be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
Joan Fons
0d57bbaae5 Add missing color pass flags to the valid list
Some valid flag combinations were missing, causing error spam in certain situations.
2022-04-21 12:37:56 +02:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
Yuri Rubinsky
f4b0c7a1ea
Merge pull request #60175 from Geometror/visual-shader-vector4 2022-04-20 08:33:42 +03:00
Clay John
c77bbde7ae
Merge pull request #60214 from JFonS/fix_depth_prepass
Fix depth pre-pass on all face cull modes
2022-04-19 11:37:34 -07:00
Ellen Poe
afd2bbaa5f Fix ogg edge cases 2022-04-17 14:21:35 -07:00
Bastiaan Olij
0b4fd92a17 Moved particles into ParticlesStorage 2022-04-17 13:13:22 +10:00
Bastiaan Olij
b6faf6c6c0 Move light, reflection probe and lightmap into LightStorage 2022-04-17 13:13:18 +10:00
Bastiaan Olij
6b28d94e77 Merge canvas and decal into TextureStorage and add render target 2022-04-17 12:59:50 +10:00
Rémi Verschelde
8fee88947e
Merge pull request #60213 from JFonS/fix_depth_state 2022-04-13 18:28:49 +02:00
Joan Fons
1270b542bb Fix depth pre-pass on all face cull modes
The default shadow material was used for depth rendering disregarding the cull mode of the original material. This commit adds a check so the default shadow material is only used when the original material has back-face culling.
2022-04-13 17:37:28 +02:00
Joan Fons
259e50f447 Fix regression in rasterizer state
Fixes a regression introduced by the color pass flags rework. The various rasterizer state structs were not being reset for each flag combination, which meant some state changes were wrongly applied to some flag combinations.
2022-04-13 16:21:40 +02:00
Rémi Verschelde
46ef52162e Color: Rename to_srgb/to_linear to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
Rémi Verschelde
43305c6b79
Merge pull request #60017 from timothyqiu/nav-server-free
Rename `NavigationServer`'s `free` method to `free_rid`
2022-04-13 08:33:18 +02:00
Hendrik Brucker
cf58d23a72 Add Vector4 to VisualShader 2022-04-12 19:09:29 +02:00
Yuri Rubinsky
3d63f6e36d
Merge pull request #60171 from Chaosus/restore_aa 2022-04-12 18:09:58 +03:00
Rémi Verschelde
724dd82f92
Merge pull request #60069 from Calinou/fsr-fix-editor-enum 2022-04-12 14:33:52 +02:00
Rémi Verschelde
a7b1d85828
Merge pull request #59825 from Chaosus/shader_fix
Fix incorrect parsing array's `length()` at return statement in shader
2022-04-12 12:40:54 +02:00
Yuri Roubinsky
6e9535a9c8 Restore antialiasing for draw_line 2022-04-12 13:03:56 +03:00
Hugo Locurcio
1a41a177e4
Use less blur for distant directional shadow splits
This makes the transition between shadow splits less noticeable,
specially when the expensive Blend Splits property is disabled.
2022-04-11 19:37:49 +02:00
Rémi Verschelde
9528aa42be
Merge pull request #60102 from KoBeWi/graphememe 2022-04-11 17:49:46 +02:00
Rémi Verschelde
0fb3d69bb7
Merge pull request #60137 from JFonS/fix_default_shadow_tex
Fix Vulkan validation errors on default depth textures
2022-04-11 17:38:21 +02:00
Yuri Rubinsky
31d2304ac4
Merge pull request #57899 from Chaosus/fix_aa 2022-04-11 18:29:54 +03:00
Rémi Verschelde
dcdc6954f8
Merge pull request #60138 from JFonS/fix_spec_constants 2022-04-11 14:18:50 +02:00
Rémi Verschelde
5613ac37d6
Merge pull request #59440 from bruvzg/fd_ref_counted 2022-04-11 14:12:18 +02:00
jfons
c4c0ef116a Fix specialization constant updates in color passes
The color pass specialization constants were not being updated after splitting them to their own array.
2022-04-11 12:40:17 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
jfons
bdc239a5a9 Fix Vulkan validation errors on default depth textures
The validation layers were complaining that we use DEFAULT_RD_TEXTURE_WHITE (which is RGBA8) in places where it's sampled as a depth texture. This commit adds the new default texture DEFAULT_RD_TEXTURE_DEPTH and uses it where needed.
2022-04-11 11:53:49 +02:00
bruvzg
75eec38772
[TextServer] Fix long selection performance. 2022-04-11 11:37:38 +03:00
kobewi
2c85599218 Improve shaped_text_get_word_breaks() 2022-04-10 17:43:52 +02:00
Hugo Locurcio
d15b69118d
Fix 3D scaling enum size in the editor and improve descriptions 2022-04-09 17:53:45 +02:00
Haoyu Qiu
63a9188ddb Rename NavigationServer's free method to free_rid 2022-04-08 17:39:17 +08:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
f454cea785
Merge pull request #58452 from marcgpuig/text-edit-backspace-fix 2022-04-04 23:58:33 +02:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Marc Garcia Puig
f22d257025 Fixed ctrl + backspace on empty lines
Fix <word><space><caret> scenario

Fix move left & right for lines without words
2022-04-04 01:21:16 +02:00
Yuri Roubinsky
0864c9abaa Fix incorrect parsing array's length() at return statement in shader 2022-04-03 09:55:04 +03:00