Commit Graph

678 Commits

Author SHA1 Message Date
Yuri Rubinsky
e5b7a95f88 Implement glow map effect 2024-11-14 00:27:23 +01:00
Haoyu Qiu
54f6334f40 Fix PopupMenu margin and separation calculations 2024-11-13 23:27:35 +01:00
Haoyu Qiu
e42a091db4 Fix Button not listing hover_pressed stylebox 2024-11-13 23:22:36 +01:00
Haoyu Qiu
0cee401740 Fix button click detection when Tree is rotated 2024-11-13 23:22:11 +01:00
lawnjelly
af805132b2 Fix physics platform behaviour regression
Lifetime checks for stored `RIDs` for collision objects assumed they had valid `object_ids`.
It turns out that some are not derived from `Object` and thus checking `ObjectDB` returns false for some valid `RIDs`.
To account for this we only perform lifetime checks on valid `object_ids`.
2024-11-13 23:13:54 +01:00
951ae7b11d Backported from godot4: Add the ability to look-at in model-space.
This is a much simpler attempt to solve the same problem as #76060, but
without breaking any compatibility.

* Adds a description of what model space is in the Vector3 enums
(MODEL_* constants). This has the proper axes laid out for imported 3D
assets.
* Adds the option to `look_at` using model_space, which uses
Vector3.MODEL_FRONT as forward vector.

The attempt of this PR is to still break the assumption that there is a
single direction of forward (which is not the case in Godot)
and make it easier to understand where 3D models are facing, as well as
orienting them via look_at.

- reduz

5fdc1232ef

Also bound the new Basis helper methods.
2024-09-30 17:04:00 +02:00
lawnjelly
34cdbd1c46 Safe Camera::unproject_position()
`unproject_position()` can fail in some circumstances, and this needs to be conveyed to calling code.
2024-09-07 09:27:25 +02:00
Rémi Verschelde
bcd989020e PopupMenu: Update margins on visibility change
Fixes #96149.

Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2024-09-07 09:25:05 +02:00
Ricardo Subtil
39cae06fbf Fix PopupMenu size calculations not taking into account control/canvas scale 2024-07-20 20:50:34 +02:00
Hugo Locurcio
769c33abdf Backport DirectionalLight fade_start property to 3.x
- Implement shadow fading when using the Orthogonal shadow mode
  (like in `master`).

This allows customizing the distance at which directional shadows
start to fade away. Shadow fading will also always start at the same
distance now, regardless of the current shadow mode in use.

This is useful for enclosed levels to prevent shadows from fading
at all with a well-tuned maximum distance.

The default fade start value (0.8) results in fading happening later
in the distance compared to the previous behavior, where fading started
from the last shadow split distance (0.6 in PSSM 4 Splits and
0.1 in PSSM 2 Splits).
2024-07-17 00:11:17 +02:00
f9507dc475 Clang format everything again. 2024-07-16 21:29:26 +02:00
8181808b74 Ran the header guard move script. 2024-07-16 21:27:34 +02:00
c7ac1db971 Clang format everything. 2024-07-16 21:23:54 +02:00
efccdca45f Added back GIProbes. 2024-07-16 19:07:24 +02:00
85cddb07b4 Renamed Particle to GPUParticle and Particle2D to GPUParticle2D pt4. 2024-07-16 16:59:21 +02:00
7c5e16effb Renamed Particle to GPUParticle and Particle2D to GPUParticle2D pt2. 2024-07-16 16:14:42 +02:00
db3680f8e7 Fix includes. 2024-07-16 16:06:23 +02:00
cac80e3167 Renamed Particle to GPUParticle and Particle2D to GPUParticle2D pt1. 2024-07-16 16:02:00 +02:00
9af21bf8a5 Adding back the gpu based particles pt1. 2024-07-16 08:22:27 +02:00
f297ccbc7d Added back the scene side lighmapper classes. 2024-07-15 21:20:48 +02:00
d899382c30 Added back the xatlas_unwrap module. Also moved xatlas into it so it's not in the thirdparty folder. 2024-07-15 20:21:33 +02:00
62fdccce25 Adding back lightmaps pt2. 2024-07-15 19:15:47 +02:00
98cbf1026a Adding back lightmaps pt1. 2024-07-15 17:36:28 +02:00
kleonc
18cabe9d32 Always look for unique node names in owner if not found in owned nodes
(cherry picked from commit 95ced4bbdcea4d8e225e235fc120c4ebd72f443d)
2024-07-14 21:03:13 +02:00
lawnjelly
9909bef3d6 Physics Interpolation - refactor client interpolation pump
* Move client interpolation pump to earlier in the iteration before 3D physics synced
* Allow `get_global_transform_interpolated()` to prime the client interpolation inside a physics tick
2024-07-14 11:19:30 +02:00
lawnjelly
1be9006ab0 Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
2024-07-14 11:18:12 +02:00
lawnjelly
113b4d8f84 Editor 3D view mesh stats
Similar to information window, add a small optional window to display face count and other stats.
2024-07-14 09:47:31 +02:00
lawnjelly
4f1f6633e1 Fix Viewport interpolation mode
Viewport interpolation mode is a special case, which should be set to ON instead of INHERIT.
2024-07-14 08:40:21 +02:00
lawnjelly
2473bd2234 Physics Interpolation - Fix VisualInstance::set_instance_use_identity_transform()
The logic for updating the `VisualServer` with the transform was the wrong way around.
2024-07-14 08:38:04 +02:00
150b8e5c02 Update theme item names for pandemonium. 2024-07-14 08:29:21 +02:00
Haoyu Qiu
410029c9e0 Fix theme item parameter completion 2024-07-14 08:27:13 +02:00
Haoyu Qiu
b43f5d220a Add range hint for ViewportContainer.stretch_shrink 2024-07-14 08:26:25 +02:00
lawnjelly
c7888ff2da Mesh merging - refactor to be backward compatible for CPU / GPU storage
Allows the old `merge_meshes()` function to work from the editor.
2024-07-14 08:16:10 +02:00
lawnjelly
21f913be43 Fix physics tick counter
The counter is now incremented at the start of a physics tick rather than the end.
2024-07-14 08:12:52 +02:00
kleonc
e5ec234b16 Fix AtlasTexture::draw_rect flipping for non-zero margin 2024-07-14 07:52:01 +02:00
Haoyu Qiu
144e69dc2c Fix TabContainer not updating content rect after toggling tab icon 2024-07-14 07:50:36 +02:00
18335d938c Revert "Ignore a maybe-uninitialized warning in AudioStreamPlayer3D."
This reverts commit 05f19a003b.
2024-06-18 13:44:32 +02:00
05f19a003b Ignore a maybe-uninitialized warning in AudioStreamPlayer3D. 2024-06-18 10:32:33 +02:00
3b84801274 Added a group for the toplevel property in Node2D. 2024-05-11 10:37:52 +02:00
1b14af3a98 Moved the y_sort property from YSort to Node2D. Node2d has it off by default while YSort has it on by default. 2024-05-10 17:23:52 +02:00
f09ab537e0 Clang-format everything. 2024-04-21 15:27:36 +02:00
2c09e8c8af Fix compile error. 2024-04-21 14:58:11 +02:00
789e640b9d Fix build. 2024-04-21 14:54:17 +02:00
Paweł Fertyk
2154c87432 Fix AudioStreamPlayer not paused on pause mode change
Fixes #58543.
2024-04-21 14:27:49 +02:00
lawnjelly
91090ff296 Portals - defer setting active in VisualServer until enter tree
`set_portal_active()` was being called loading packed scenes prior to entering the tree, visual server portals had not been fully created at this point hence the call was being ignored with an error flagged.
This PR defers the call until after entering the tree.
2024-04-21 14:22:52 +02:00
lawnjelly
64bbac30ee Fix physics on_floor_body crash
Physics body previously stored the RID of a collision object and accessed it on the next frame, leading to a crash if the object had been deleted.
This PR stores the ObjectID in addition to the RID, and checks the object still exists prior to access.
2024-04-21 14:20:26 +02:00
Haoyu Qiu
b67115fd35 Store ObjectID instead of pointer for KinematicCollision owner 2024-04-21 14:17:59 +02:00
Haoyu Qiu
9f75f7dfc0 Fix SceneTree not respecting virtual process methods
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2024-04-21 14:15:45 +02:00
6faa98c32a Backported from godot4: Save PackedByteArrays as base64 encoded.
- groud
de5073519e
2024-04-14 17:32:05 +02:00
Haoyu Qiu
441bb29fd3 Add is_zero_approx methods to Vector{2,3} 2024-04-14 16:44:38 +02:00