Commit graph

3584 commits

Author SHA1 Message Date
Rémi Verschelde
5062aafc2d Merge pull request #64417 from aaronfranke/has-space
Replace AABB/Rect2/Rect2i has_no_* methods with has_* methods
2022-09-06 17:00:44 +02:00
ceLoFaN
e844b95eaf Fix DoF artifacting at high blur amounts 2022-09-05 21:38:40 +03:00
Rémi Verschelde
6c818da55e
Merge pull request #65321 from rburing/physics_server_2d_extension
Create GDExtension classes for PhysicsServer2D
2022-09-05 12:44:58 +02:00
Aaron Franke
817ae95667
Replace AABB has_no_volume with has_volume
Also replace has_no_surface with has_surface
2022-09-04 23:03:36 -05:00
Haoyu Qiu
52f290ae4d Fix crash when executing CSGMesh3D.set_mesh with headless Godot 2022-09-05 09:15:22 +08:00
Ricardo Buring
d22ff48b3d Create GDExtension classes for PhysicsServer2D
This allows a 2D physics server created entirely from GDExtension.
Based on the structure of PhysicsServer3DExtension by reduz.
2022-09-04 12:04:08 +02:00
Hugo Locurcio
b83e0b6447
Use verbose prints when registering cameras in CameraServer
This prevents lines from being printed every time the editor or project
starts in the editor Output log.
2022-09-02 23:26:04 +02:00
Rémi Verschelde
3a62c294c7 Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray 2022-09-02 13:57:02 +02:00
Rémi Verschelde
f81a4b2478 Merge pull request #65026 from bruvzg/dark_mode 2022-09-02 13:54:46 +02:00
Rémi Verschelde
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Jonathan Nicholl
15d057c521 Add is_zero_approx methods to Vector2, 3, and 4 2022-09-02 00:29:50 -04:00
Rémi Verschelde
d63c6fc463 Merge pull request #60185 from Calinou/environment-fog-and-sky-affect 2022-09-01 23:52:34 +02:00
Rémi Verschelde
168f6ca63b Merge pull request #65216 from bruvzg/trim_fix 2022-09-01 23:50:20 +02:00
Rémi Verschelde
2e0cffdb6f Merge pull request #63479 from DarkKilauea/nav-link 2022-09-01 23:44:22 +02:00
bruvzg
f131b69032
[TextServer] Fix excessive space trimming. 2022-09-01 21:31:39 +03:00
Hugo Locurcio
699e9f7966
Add Environment properties to control fog rendering on background sky
Values lower than 1.0 can be used to make the fog rendering not fully
obstruct the sky. This can be desired when using fog as a purely
atmospheric effect, without intending to use fog for open world fog
fading.

When set to 0.0, fog rendering behavior will be similar to Godot 3.x
where sky rendering was never affected by fog.
2022-09-01 19:07:39 +02:00
Rémi Verschelde
027415312e
Merge pull request #65132 from bruvzg/global_menu_shortcuts_context 2022-09-01 17:02:04 +02:00
kobewi
7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
Bastiaan Olij
2cd84be64d Extracting render buffers and changing it to a more generic solution 2022-09-01 20:01:45 +10:00
Yuri Rubinsky
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
Rémi Verschelde
89f0886425
Merge pull request #65073 from bruvzg/trim_spaces
[TextServer] Add support for trimming edge spaces on line break.
2022-09-01 08:16:52 +02:00
bruvzg
b85a4c5d79
[macOS] Handle accelerator and click events of the global menu items separately. 2022-09-01 08:13:56 +03:00
bruvzg
7aad14a4b6
[TextServer] Add support for trimming edge spaces on line break. 2022-09-01 08:11:55 +03:00
clayjohn
385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
bruvzg
629ae58a80
Add support for system dark mode and accent color detection (macOS and Windows). Add support for dark mode title bar on Windows. 2022-08-31 11:37:01 +03:00
Rémi Verschelde
c40855f818
Merge pull request #65130 from BastiaanOlij/fix_mobile_signed_tangent
Fix vector type for signed tangent in mobile shader
2022-08-31 09:12:31 +02:00
Rémi Verschelde
d58a1d65a9
Merge pull request #63413 from Calinou/volumetric-fog-add-per-light-energy-2
Add a per-light volumetric fog energy property
2022-08-31 08:47:03 +02:00
Bastiaan Olij
708222bb9a Fix vector type for signed tangent in mobile shader 2022-08-31 16:35:54 +10:00
Haoyu Qiu
ad6d6a7893 Remove unnecessary print_line in RendererDummy 2022-08-31 09:44:02 +08:00
Hugo Locurcio
09bedcead4
Add a per-light volumetric fog energy property
Per-light energy gives more control to the user on the final result of
volumetric fog. Specific lights can be fully excluded from volumetric fog
by setting their volumetric fog energy to 0, which improves performance
slightly. This can also be used to prevent short-lived dynamic effects
from poorly interacting with volumetric fog, as it's updated over several
frames by default unless temporal reprojection is disabled.

Volumetric fog shadows now obey Light3D's Shadow Opacity property as well.

The shadow fog fade property was removed as it had little visible impact
on the final scene's rendering.
2022-08-30 20:03:38 +02:00
Rémi Verschelde
c1b178be38
Merge pull request #65068 from BastiaanOlij/fix_dummy_mesh_allocation 2022-08-30 19:49:36 +02:00
Rémi Verschelde
02d510bd07
Merge pull request #63003 from Geometror/msaa-2d 2022-08-30 14:54:20 +02:00
Bastiaan Olij
9efff344b8 Dummy mesh support was added to the dummy renderer but incomplete. This completes it 2022-08-30 16:28:39 +10:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Ricardo Buring
219a582a15 Fix collision solving between world boundary and shapes in motion (2D) 2022-08-29 17:34:06 +02:00
sakrel
728fb6ea95
Fix updating OccluderPolygon shapes 2022-08-29 03:51:53 +02:00
Ricardo Buring
da37540d97 Fix collision solving between world boundary and motion shape 2022-08-27 19:51:14 +02:00
Josh Jones
3dd59013f4 Added node for Navigation links 2022-08-26 22:05:15 -07:00
Rémi Verschelde
4808d01b2b
Merge pull request #64223 from Calinou/taa-fxaa-use-negative-mipmap-lod-bias
Automatically use negative mipmap LOD bias when TAA and/or FXAA are enabled
2022-08-26 23:11:25 +02:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Rémi Verschelde
4f60fd0480
Merge pull request #64777 from bruvzg/extend_to_title
[macOS] Extend editor contents to the window title bar for better space usage.
2022-08-26 23:03:31 +02:00
Micky
59e11934d8 Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
bruvzg
bc4ba6cb78
[macOS] Extend editor contents to the window titlebar for better space usage. 2022-08-26 15:12:43 +03:00
fabriceci
f8cc88fab3 Restore RigidBody2/3D, SoftBody names in physics 2022-08-26 12:26:25 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
Micky
723bf85145 Rename ParticlesMaterial to ParticleProcessMaterial
Also affects their file names, related classes and documentation.
2022-08-26 02:53:08 +02:00
Hugo Locurcio
45bc1a3790
Automatically use negative mipmap LOD bias when TAA and/or FXAA are enabled
This improves texture sharpness when TAA and/or FXAA are enabled,
without requiring manual user intervention.
2022-08-25 19:38:18 +02:00
Rémi Verschelde
5d78ab4388
Merge pull request #64749 from tefusion/fix_skeleton_editor_mesh_free_errors
Fix typo in RendererSceneCull which caused mesh_free errors
2022-08-25 18:54:25 +02:00
Rémi Verschelde
af88438c71
Merge pull request #64354 from Mickeon/rename-navigation-distance 2022-08-25 18:35:23 +02:00
Rémi Verschelde
33bf609d79
Merge pull request #64820 from Chaosus/shader_fix_varyings 2022-08-25 18:02:38 +02:00
Yuri Rubinsky
d4a10e7e04 Allow using integer varyings with flat interpolation modifier 2022-08-25 13:21:02 +03:00
Rémi Verschelde
fa80064779
Merge pull request #64607 from RandomShaper/safe_audio_threading 2022-08-25 10:12:25 +02:00
Rémi Verschelde
4698dc67b5
Merge pull request #64082 from KoBeWi/array3k 2022-08-24 16:05:59 +02:00
Rémi Verschelde
96194628df
Merge pull request #64346 from firefly2442/patch-1 2022-08-24 14:36:07 +02:00
kobewi
f7f4873ed0 Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
Rémi Verschelde
91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Rémi Verschelde
be5c1e2737
Merge pull request #64719 from akien-mga/property-slasher 2022-08-23 18:16:59 +02:00
Rémi Verschelde
8317ff74d6
Merge pull request #63091 from MinusKube/editor-window-render-bug 2022-08-23 12:59:34 +02:00
Rémi Verschelde
7764151bc1 Rename properties unnecessarily using slash (/) in their names
This is a legacy of Godot 2 days before the inspector had support for groups.
"Properties" with a slash in their name can't be accessed from script unless
using `set()`/`get()` so they were not actual properties as far as script
languages are concerned.

Part of #17558.
2022-08-23 11:57:43 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
tefusion
a2c422a6da Fix typo in RendererSceneCull
Frees skeleton 3d gizmo now correctly
2022-08-22 22:09:56 +02:00
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
Rémi Verschelde
7b4927bb5f
Merge pull request #60309 from The-O-King/oct 2022-08-22 19:29:21 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Rémi Verschelde
5193332d10
Merge pull request #64343 from TokageItLab/priority-ph 2022-08-22 17:31:23 +02:00
Omar El Sheikh
61522d8491 Add Blendshape Support
Update the blendshape shader to decode/encode octahedral normals
2022-08-20 20:59:28 -07:00
Hugo Locurcio
0c5f254956
Merge pull request #64110 from Geometror/fix-light-shadow-off 2022-08-20 17:06:03 +02:00
Yuri Rubinsky
499fd0a4e7 Add defined keyword support to shader preprocessor 2022-08-20 11:26:59 +03:00
Max Hilbrunner
5e0d2b5097
Merge pull request #62046 from clayjohn/vertexless-draw
Allow creating meshes without vertex positions
2022-08-20 05:32:28 +02:00
Hendrik Brucker
18585c69b3 Fix OmniLight/SpotLight shadow opacity calculation 2022-08-20 01:05:44 +02:00
clayjohn
bbbcdd725a Remove requirement to have vertex positions when creating a mesh. Meshes can now be constructed from an index buffer alone 2022-08-19 14:50:12 -06:00
Yuri Rubinsky
8779f51a5e
Merge pull request #63960 from bitsawer/fix-macro-expansion 2022-08-19 23:37:47 +03:00
Max Hilbrunner
019d6584ee
Merge pull request #64167 from clayjohn/screen-texture-hint
Add shader uniform hints for screen textures
2022-08-19 21:51:39 +02:00
Max Hilbrunner
117c530e1d
Merge pull request #64342 from clayjohn/DOF-scale
Properly scale depth in bokeh_dof effect
2022-08-19 21:16:32 +02:00
Pedro J. Estébanez
9d546bf05a Make audio thread control flags safe 2022-08-19 13:28:10 +02:00
Yuri Rubinsky
35cfaafda8
Merge pull request #64459 from Chaosus/shader_elif 2022-08-19 07:01:22 +03:00
Max Hilbrunner
420a8c888e
Merge pull request #63950 from bruvzg/menu_bar3
Implement MenuBar control to wrap Popup menus or native menu, use native menu for editor.
2022-08-19 01:24:24 +02:00
bruvzg
8c56a7416b
Implement MenuBar control to wrap PopupMenus or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
Aaron Franke
f91934872d
Use a const ref for the bone AABB in rendering code 2022-08-18 12:20:11 -05:00
Max Hilbrunner
462bb3bf32
Merge pull request #64534 from YuriSizov/docs-navigation-takes-a-nap
Fix a typo in navigation server documentation
2022-08-18 16:59:18 +02:00
Clay John
982ff7d925
Merge pull request #64416 from aaronfranke/aabb
Don't try to merge unused bone AABBs in the rendering server
2022-08-17 23:56:05 -06:00
Silc Renew
b31115cdc1 Add collision weight to PhysicsBody for penetrations must be avoided
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2022-08-18 08:10:31 +09:00
Yuri Sizov
bedaa2b535 Fix a typo in navigation server documentation 2022-08-17 17:05:46 +03:00
Yuri Rubinsky
13ab70ed2a Add elif directive to shader preprocessor 2022-08-15 22:06:49 +03:00
Aaron Franke
e0d80b37e9
Don't try to merge unused bone AABBs in the rendering server 2022-08-14 23:30:48 -05:00
Yuri Rubinsky
22df2c527b Implement coloring for disabled branches in the shader editor 2022-08-14 13:57:26 +03:00
Omar El Sheikh
78881b3cc3 Octahedral Normal/Tangent Compression
Implementation of Octahedral normal compression into Godot 4.0
2022-08-13 08:09:32 -07:00
Patrick
2b93f44739 small typo in TextServer, changes bitwise to logical which can be faster in some cases via "short circuiting" 2022-08-13 07:44:41 -06:00
Micky
b62d06fbed Rename Navigation's neighbor_dist to neightbor_distance
NavigationAgent2D/3D.`neighbor_dist` -> `neighbor_distance` (also affects setters and getters)

NavigationServer2D/3D.`agent_set_neighbor_dist()` -> `agent_set_neighbor_distance()`

Also changes their parameters' names.

Doesn't affect "Agent.neighborDist_" in Agent.h
2022-08-13 12:40:55 +02:00
Hendrik Brucker
e96b1a2c0c Implement MSAA for 2D [Vulkan only] 2022-08-13 01:09:48 +02:00
clayjohn
7d6287f616 Properly scale depth in bokeh_dof effect so that setting distance to blur effect is accurate again 2022-08-12 16:39:05 -06:00
Yuri Rubinsky
f2a6168414
Merge pull request #64310 from Chaosus/shader_texture_funcs 2022-08-12 21:28:22 +03:00
Yuri Rubinsky
e21aad968d Add textureQueryLod/Levels functions to the shader language 2022-08-12 20:44:57 +03:00
Yuri Rubinsky
7822fbc9e2 Add textureProjGrad function to the shader language 2022-08-12 12:01:37 +03:00
Hugo Locurcio
ff9118d103
Merge pull request #64225 from Calinou/3d-scaling-bilinear-use-negative-mipmap-bias 2022-08-11 21:41:37 +02:00
clayjohn
7c848ee591 Detect if VRS supported before creating default VRS texture 2022-08-10 13:27:19 -06:00
Hugo Locurcio
b06890c2b7
Use negative mipmap LOD bias for sub-native bilinear 3D scale
This provides a benefit similar to FSR 1.0 (greater texture sharpness
at the cost of some graininess at sub-native resolution scales), but
without the added performance cost of FSR 1.0.
2022-08-10 17:16:02 +02:00
Silc Renew
7331295523 add get_depth() to KinematicCollision3D as same of 2D 2022-08-10 10:33:58 +09:00
MinusKube
be09a87ff9 Fix viewport sorting being wrong on parent/child relation 2022-08-10 01:23:23 +02:00
Rémi Verschelde
29422b60f1
Merge pull request #64146 from smix8/fix_editor_disabled_navigationserver_4.x 2022-08-10 00:03:39 +02:00
clayjohn
028ef2edc8 Add shader uniform hints for screen textures so users can specify custom filter and repeat modes.
At this time, it works best in the Vulkan Renderers as they support using multiple samplers with the same texture.

In GLES3 this feature really only allows you to use the screen texture without mipmaps if you want to save the cost of generating them.
2022-08-09 12:29:49 -04:00
smix8
d254f0fa5f Add NavigationServer2D debug functions
Adds debug functions to NavigationServer2D to mirror NavigationServer3D functions for 2D users.
2022-08-09 12:21:45 +02:00
smix8
8bfea7dcb4 Fix Editor Navigation debug edge connection visuals
Fixes missing Navigation debug edge connection visuals in Editor due to disabled NavigationServer.
2022-08-09 11:59:31 +02:00
Bastiaan Olij
f50f0844e9 Fix resource leaks in VoxelGI 2022-08-09 15:18:03 +10:00
bruvzg
e7464e7a30
Fix macOS and iOS defines in the rendering code. 2022-08-08 17:51:31 +03:00
Rémi Verschelde
afeb7572e3
Merge pull request #64078 from Nosliwnayr/master 2022-08-08 15:38:41 +02:00
Rémi Verschelde
8734ef1f7a
Merge pull request #62547 from clayjohn/ref_vec_pbr 2022-08-08 10:18:32 +02:00
Ryan Heath
9d4e5a466e Add area monitor callback error checking 2022-08-07 13:47:03 -07:00
Rémi Verschelde
f754dd20be
Merge pull request #62454 from Geometror/reflect-refract-vec2-vec4
Allow for vec2/vec4 to be used in reflect and refract
2022-08-07 19:16:05 +02:00
Hendrik Brucker
b8d5f4bdd5 Allow vec2 and vec4 for reflect and refract 2022-08-07 18:03:16 +02:00
Hugo Locurcio
baaa7503c7
Add a shadow opacity property to Light3D
This can be used to make shadows translucent for a specific light.

The light distance fade system also uses this to smoothly fade the shadow
when the light fade transition distance is greater than 0.
2022-08-07 11:06:32 +02:00
bitsawer
691e067ef5 Fix shader preprocessor macro expansion 2022-08-05 17:41:24 +03:00
Juan Linietsky
f999f52f0a Add a Framebuffer cache
Adds a FramebufferCache singletion that operates the same way as UniformSetCache.

Allows creating framebuffers on the fly (and keep them cached if re-requested) such as:

```C++
RID fb = FramebufferCache::get_singleton()->get_cache(texture1,texture2);
```
2022-08-05 13:37:29 +02:00
Hugo Locurcio
db22b7ded0
Rename shader parameter uniform setter/getter methods for consistency
`shader_uniform` is now consistenly used across both per-shader
and per-instance shader uniform methods. This makes methods easier
to find in the class reference when looking for them.
2022-08-04 23:17:06 +02:00
Rémi Verschelde
52bfae1741
Merge pull request #63918 from akien-mga/no-s3tc-for-mobile 2022-08-04 21:40:45 +02:00
Rémi Verschelde
8a9700c8a7 Force disable S3TC support on Android/iOS since we don't handle it
Fixes #63909 for now.
This could be improved in the future if we want to properly support S3TC on mobile.
2022-08-04 18:27:56 +02:00
Brian Semrau
103c0fa6e6 Add support for multiple virtual keyboard types 2022-08-04 10:41:33 -04:00
Rémi Verschelde
fdceece7f8
Merge pull request #63899 from bruvzg/hb_510
HarfBuzz: Update to version 5.1.0, use new FLAG_SAFE_TO_INSERT_TATWEEL flag to improve justification.
2022-08-04 09:12:05 +02:00
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