Commit Graph

192 Commits

Author SHA1 Message Date
Yuri Rubinsky
e5b7a95f88 Implement glow map effect 2024-11-14 00:27:23 +01:00
jitspoe
be3b2cf08f Fix random multithreaded crash that happens when setting the audio stream on a AudioStreamRandomPitch stream. 2024-11-13 23:23:19 +01: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
c7ac1db971 Clang format everything. 2024-07-16 21:23:54 +02:00
85e7f7327e Fix and enable the gles3 renderer by default. 2024-07-16 19:44:22 +02:00
efccdca45f Added back GIProbes. 2024-07-16 19:07:24 +02:00
9af21bf8a5 Adding back the gpu based particles pt1. 2024-07-16 08:22:27 +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
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
dbf9be88d9 Physics interpolation - Zero server side multimesh data
To prevent possibility of use of uninitialized data.
2024-07-14 08:44:39 +02:00
lawnjelly
2c471d100d Tighter light culling - fix directional lights colinear case
Exactly the same fix as done already for non-directional lights.
2024-07-14 08:44:17 +02:00
lawnjelly
f033baee93 Tight shadow culling - increase epsilon to prevent flickering
Near colinear triangles were still causing inaccuracy in culling planes, so the threshold for colinearity is bumped up.
2024-07-14 08:30:51 +02:00
f92fd3374b Don't error in RenderingServerRaster::free() if the supplied RID is just invalid. 2024-05-11 19:32:46 +02:00
ae76b04fdb Fix typo. 2024-05-11 15:57:34 +02:00
f09ab537e0 Clang-format everything. 2024-04-21 15:27:36 +02:00
lawnjelly
4496c11437 Tighter shadow culling - fix light colinear to frustum edge
In rare situations if a light is placed near colinear to a frustum edge, the extra culling plane derived can have an inaccurate normal due to floating point error.
This PR detects colinear triangles, and prevents adding a culling plane in this situation.
2024-04-14 16:35:26 +02:00
f6d9ca069f Fix build. 2024-04-06 13:46:57 +02:00
lawnjelly
909acac329 Discrete Level of Detail
Add scene side discrete level of detail.

New node `LOD` for UI, and `LODManager` within `World` for automatically updating child visibilities based on distance from cameras.
2024-04-06 12:06:01 +02:00
lawnjelly
bb9cd55575 Physics Interpolation 2D - change transform API to use const ref 2024-04-06 10:55:53 +02:00
053b283c47 Reworked RendetingServer's canvas_item_add_texture_rect_animation's last parameter. Now instead of bool randomize_start_time it's real start_time. This should make it more versatile. 2024-03-12 17:52:12 +01:00
90ae8d4791 Tweaks to CommandRectAnimation's destructor. 2024-03-12 06:15:35 +01:00
588b50e9ce Added randomize_start_time optional parameter to canvas_item_add_texture_rect_animation(). 2024-03-11 20:53:05 +01:00
8a8193e8d3 Fix memleak. 2024-03-11 20:51:14 +01:00
2934369381 Added a new canvas_item_add_texture_rect_animation() method to the RenderingServer. 2024-03-11 18:21:05 +01:00
34ddcc3694 Fix build on MSVC. 2024-02-15 20:38:16 +01:00
7ce8e97b13 Disabled the WindowServer for now. 2024-02-08 23:45:33 +01:00
2abfd57704 Fix error. 2024-02-08 22:44:02 +01:00
a5d8696021 Ported: Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
- lawnjelly
0aa22b8f13
2024-02-08 21:35:01 +01:00
c3c6d64a50 Portred: Add MergeGroup node to simplify merging Meshes at runtime.
- lawnjelly
8b79135538
2024-02-08 21:00:07 +01:00
5d2a594843 Ported: Shadow volume culling and tighter shadow caster culling
Existing shadow caster culling using the BVH takes no account of the camera. This PR adds the highly encapsulated class VisualServerLightCuller which can cut down the casters in the shadow volume to only those which can cast shadows on the camera frustum.
This is used to:
* More accurately defer dirty updates to shadows when the shadow volume does not intersect the camera frustum.
* Tighter cull shadow casters to the view frustum.
Lights dirty state is now automatically managed:
* Continuous (tighter caster culling)
* Static (all casters are rendered)
- lawnjelly
8ca631a466
2024-02-08 18:40:44 +01:00
lawnjelly
f09cdf5954 Portals - include in bound and special cases in start room
* Re-introduces a property for portals to decide whether they are included in room bounds during room conversion.
* Adds a special case for portals that extend into the start room, which may be caused by level design inaccuracies.
2024-02-08 15:10:00 +01:00
Bartłomiej T. Listwon
7101e4aed7 Prevent shuffling custom shader functions (shader cache requires determinism) 2024-02-08 14:48:50 +01:00
562fe84f67 Don't print error when there is no default NavigationMeshGenerator. 2024-01-02 13:05:52 +01:00
Rémi Verschelde
1c70f86950 Fix various GCC 13 warnings
Fixes occurrences of `-Wtype-limits`, `-Wmaybe-uninitialized`,
`-Wduplicated-branches`.
2023-12-20 22:57:54 +01:00
5133ef182d File copyright header updates pt10. 2023-12-18 00:31:04 +01:00
70f749688b Renamed DisplayServer to WindowServer. 2023-12-12 14:51:08 +01:00
a99e07563d Initial DisplayServer method setup. 2023-12-12 14:39:28 +01:00
c11e564b4e Added a new dummy DisplayServer class. 2023-12-12 13:35:51 +01:00
88e9ad04f2 Moved back the servers and resources from core. 2023-12-10 23:11:07 +01:00
11945d7f1d Split material.h. 2023-12-10 21:26:28 +01:00
053f083e17 Moved the Physics 2d server to core. 2023-12-10 19:42:57 +01:00
dbcc6e33da Moved the physics server to core. 2023-12-10 19:36:00 +01:00
238bf1b331 Moved the RenderingServer to core. 2023-12-10 19:04:24 +01:00
0dfba6c552 Moved AudioStreamSample. 2023-12-10 15:26:43 +01:00
deccaed2cc Moved materials into a new subfolder. 2023-12-10 14:59:22 +01:00
4cbc387c53 Moved the navigation relatred resources into subfolders. 2023-12-10 14:23:24 +01:00
59ae5c4662 Ported from godot: add support for 3 dir shadow splits
- Ansraer
54bc6a300e
2023-10-02 18:12:54 +02:00
f4339d2a49 Ported: CPUParticles2D - fix interpolated transforms and culling
1) Physics interpolated particles in global mode are specified in global space. In VisualServer they should therefore ignore local transform.
2) Additionally, the expected final_transform should be passed on to children, rather than the identity transform used on the local item.
3) Local bounds in hierarchical culling are fixed for items using identity transform, by calculating their local bound in local space from the global space particles.
- lawnjelly
723632a76a
2023-10-02 17:32:07 +02:00
Wilson E. Alvarez
8aa9b59eaf Fix AudioEffectRecord circular reference 2023-10-02 16:29:43 +02:00