Commit graph

3239 commits

Author SHA1 Message Date
Rémi Verschelde
7b97243521
Merge pull request #51040 from nekomatata/layer-grid-32-3.x
[3.x] Refactor layer property editor grid
2021-08-02 21:14:43 +02:00
Hugo Locurcio
93f4f9e076
Link to the Random number generation tutorial in RandomNumberGenerator
This was done in `master` already, but not in `3.x`.
2021-07-31 22:54:30 +02:00
PouleyKetchoupp
e0e9f575ae Refactor layer property editor grid
- Now able to display up to 32 layers in physics (still 20 for render)
- Adjustable grid size to fit available space in dock
- Expansion icon to display more layers vertically
- Layer numbers in cells to help with selection
2021-07-30 11:43:04 -07:00
Rémi Verschelde
9735f2803c
Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
Omar El Sheikh
d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
EricEzaM
0e5c6e0d55 Allow checking for exact matches with Action events.
Added additional param to action related methods to test for exactness.
If "p_exact_match" is true, then the action will only be "matched" if the provided input event *exactly* matches with the action event.

Before:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* Is Action Pressed = True

Now:
You can still do the above, however you can optionally check that the input is exactly what the action event is:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* p_exact_match = True
* Is Action Pressed = False
* If the Input Event was only KEY_S, then the result would be true.

Usage:

```gdscript
Input.is_action_pressed(action_name: String, exact_match: bool)
Input.is_action_pressed("my_action", true)

InputMap.event_is_action(p_event, "my_action", true)

func _input(event: InputEvent):
  event.is_action_pressed("my_action", false, true) # false = "allow_echo", true = "exact_match"
  event.is_action("my_action", true)
```

Co-authored-by: Eric M <itsjusteza@gmail.com>
2021-07-30 15:35:39 +02:00
lawnjelly
d0ba355520 Portals - add autoplace priority setting to CullInstance
The default autoplace algorithm places instances in the highest priority Room. It became apparent that there are some situations in which users will want to override this and force placement in a Room from a particular RoomGroup, especially an "outside" RoomGroup.

This setting allows the user to specify a preference for Room priority. When set to 0, the setting is ignored and the highest priority Room is chosen.
2021-07-28 17:23:20 +01:00
Hugo Locurcio
7e3c0a0c1f
Document Image.save_exr() only being available in editor builds
(cherry picked from commit a1784c64b4)
2021-07-28 15:35:52 +02:00
Rémi Verschelde
6a6b6fa5cb
Merge pull request #50827 from Calinou/bakedlightmap-add-bounce-indirect-energy 2021-07-27 10:44:41 +02:00
Rémi Verschelde
a71169c0e0
Merge pull request #50788 from aaronfranke/3.x-input-get-axis 2021-07-26 16:30:44 +02:00
Hugo Locurcio
94f79fa474
Document caveats with Control's mouse_entered/mouse_exited signals
(cherry picked from commit 37c1cbdcb2)
2021-07-26 13:36:37 +02:00
Raul Santos
f20ace5cd2
Fix typo in CollisionObject documentation
(cherry picked from commit f8374b021e)
2021-07-26 13:31:19 +02:00
Hugo Locurcio
af3f83407f
Expose an ImportOrder enum in ResourceImporter
This avoids using magic numbers in code.

(cherry picked from commit 7f83977f37)
2021-07-26 13:26:58 +02:00
Hugo Locurcio
974d3aa9cd
Add a property to control the bounce indirect energy in BakedLightmap
Higher values will make indirect lighting brighter.
A value of 1.0 represents physically accurate behavior, but higher values
can be used to make indirect lighting propagate more visibly when using
a low number of bounces.

This can be used to speed up bake times by lowering the number of bounces
then increasing the bounce indirect energy. Unlike BakedLightmapData's
energy property, this property does not affect direct lighting
emitted by light nodes or emissive materials.
2021-07-25 03:04:40 +02:00
Aaron Franke
69fb14256b
[3.x] Allow getting Input axis/vector values from multiple actions
For get_vector, use raw values and handle deadzones appropriately
2021-07-23 19:17:55 -04:00
Nicholas Huelin
6d58ea6ce7
Fix doc typos
This pull request fixes an assortment of typos and improves conciseness in `Animation`, `Area2D`,  `Array`, `ArrayMesh`, `Control`, `Directory`, `EditorPlugin`, `Engine`, and `OS`.

(cherry picked from commit 9a72b0d3d0)
2021-07-24 01:06:38 +02:00
Nicholas Huelin
bd8747f7f1
Fix miscellaneous doc typos and inconsistencies
This pull request fixes an assortment of typos, improves conciseness, and enhances clarity.

(cherry picked from commit 9787e631aa)
2021-07-24 01:00:37 +02:00
Distrikt64
1e49b6299a
Fix msec documentation description typo
(cherry picked from commit 44eb041d60)
2021-07-24 00:59:57 +02:00
Joseph Davies
b98a06b259
Fix grammar in MultiMesh documentation.
(cherry picked from commit 136567ebcf)
2021-07-24 00:58:30 +02:00
Hugo Locurcio
244425998f
Document the RootMotionView class
(cherry picked from commit 6880829a9a)
2021-07-24 00:58:11 +02:00
Rémi Verschelde
86054e00bf
Merge pull request #50446 from AnilBK/graphnode-improv-3.x
[3.x]Add missing graphnode setters.
2021-07-22 16:41:20 +02:00
Rémi Verschelde
0b4080ba4d
Merge pull request #48555 from lawnjelly/delta_sync
Add option to sync frame delta after draw
2021-07-22 13:33:57 +02:00
Rémi Verschelde
214106d6e3
Merge pull request #50723 from BastiaanOlij/combine_far_near_dof
Combined the DOF far and DOF near passes
2021-07-22 13:19:39 +02:00
lawnjelly
93557927e4 Add option to sync frame delta after draw
Investigations have showed that a lot of the random variation in frame deltas causing glitches may be due to sampling the time at the wrong place in the game loop.

Although sampling at the start of Main::Iteration makes logical sense, the most consistent deltas may be better measured after the location likely to block at vsync - either the OpenGL draw commands or the SwapBuffers.

Here we add an experimental setting to allow syncing after the OpenGL draw section of Main::Iteration.
2021-07-22 12:04:22 +01:00
Rémi Verschelde
d3f500cf33
Merge pull request #48390 from lawnjelly/delta_smooth
Add frame delta smoothing option
2021-07-22 12:43:39 +02:00
Rémi Verschelde
801205b2c1
Merge pull request #48892 from lawnjelly/bvh_robust
BVH - thread safety option
2021-07-22 12:41:42 +02:00
Bastiaan Olij
39658b4e07 Combined the DOF far and DOF near passes 2021-07-22 13:45:57 +10:00
Rémi Verschelde
028bf846a8
Merge pull request #50640 from goostengine/add-engine-print-error-property-3.x
[3.x] Add `Engine.print_error_messages` property to disable printing errors
2021-07-20 13:31:04 +02:00
Andrii Doroshenko (Xrayez)
726111f38f Add Engine.print_error_messages property to disable printing errors
Backports #48359 to 3.x.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-07-20 13:58:07 +03:00
Rémi Verschelde
f131a77f46
Merge pull request #46574 from The-O-King/split_stream_3.2
[3.4] Split Vertex Buffer Stream in Positions and Attributes
2021-07-20 10:48:37 +02:00
Aaron Franke
7dc2edc430
[3.x] Allow reading shaders from .gdshader files 2021-07-19 23:34:23 -04:00
Omar El Sheikh
7f8487a900 Split Vertex Position and Attribute Streams
Implemented splitting of vertex positions and attributes in the vertex
buffer

Positions are sequential at the start of the buffer, followed by the
additional attributes which are interleaved

Made a project setting which enables/disabled the buffer formatting
throughout the project

Implemented in both GLES2 and GLES3

This improves performance particularly on tile-based GPUs as well as
cache performance for something like shadow mapping which only needs
position data

Updated Docs and Project Setting
2021-07-19 13:23:46 -07:00
Rémi Verschelde
526447b86f
Merge pull request #50495 from nekomatata/move-and-slide-fixes-3.x
[3.x] Backport KinematicBody move_and_slide and move_and_collide fixes
2021-07-19 20:11:51 +02:00
PouleyKetchoupp
2fbb6fff4e Fix move_and_collide causing sliding on slopes
Make sure the direction of the motion is preserved, unless the depth is
higher than the margin, which means the body needs depenetration in any
direction.

Also changed move_and_slide to avoid sliding on the first motion, in
order to avoid issues with unstable position on ground when jumping.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-07-19 08:09:16 -07:00
Yuri Sizov
e05eb8a6ad Make zoom limits and step adjustable in GraphEdit 2021-07-16 22:43:28 +03:00
Rémi Verschelde
4d3c11e85e
Merge pull request #49446 from nekomatata/sync-to-physics-3d-3.x
[3.x] Support for 3D sync to physics
2021-07-16 07:15:17 +02:00
Rémi Verschelde
231efe0c6d
Merge pull request #50166 from fabriceci/fix-2d-moving-platform
[3.x] Fixing 2D moving platform logic
2021-07-15 13:34:30 +02:00
fabriceci
fba4c9d552 Fixing 2D moving platform logic
Fixing by applying the movement in two steps, first the platform
movement, and then the body movement. Plus, add the platform movement
when we are on_wall.
2021-07-15 11:57:58 +02:00
kobewi
4941d2001c
Add set_pressed_no_signal method to BaseButton
(cherry picked from commit 50c63bdc4c)
2021-07-15 10:52:22 +02:00
Tomasz Chabora
6021ab5b01
Document remaining Visual Script classes
(cherry picked from commit 1054956461)
2021-07-15 10:46:04 +02:00
Hendrik Brucker
fe616d443a
Fix color properties of particle nodes/material
(cherry picked from commit 3a4a2198ed)
2021-07-15 10:25:35 +02:00
Rémi Verschelde
a3310c1da2
Merge pull request #46130 from lawnjelly/portals
Portal occlusion culling [3.4]
2021-07-14 13:38:01 +02:00
lawnjelly
eb6f98ec55 Portal occlusion culling
Adds support for occlusion culling via rooms and portals.
2021-07-14 11:43:23 +01:00
Rémi Verschelde
aa3a5c9f6a
Merge pull request #50184 from JFonS/cpu_lightmapper_soft_shadows
[3.x] Add soft shadows to the CPU lightmapper
2021-07-14 12:18:08 +02:00
Anilforextra
d9e48a9c58 Add missing graphnode setters.
Documentation Updates.
2021-07-14 15:37:59 +05:45
lawnjelly
6914d7c6e0 Add frame delta smoothing option
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.
2021-07-14 08:44:31 +01:00
Rémi Verschelde
b0b2b7df31
Merge pull request #50257 from Calinou/physicsserver3d-add-set-iterations-3.x
Add a method to set the number of physics solver iterations in 3D (3.x)
2021-07-14 07:56:57 +02:00
Haoyu Qiu
a29b834930
Fix doc description of HTTPClient::request
(cherry picked from commit 422f821be9)
2021-07-13 10:20:03 +02:00
Hugo Locurcio
bcfa5beb8d
Make makerst.py create folders automatically, print a message when done
(cherry picked from commit f05aa9cc01)
2021-07-13 10:20:03 +02:00
Nick Huelin
88fc178d57
Add method description to PopupMenu
This pull request adds a missing method description to `PopupMenu`.

This completes the documentation for `PopupMenu` and enhances usability by doing so.

Update doc/classes/PopupMenu.xml

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 2e3cbbcd11)
2021-07-13 10:20:02 +02:00