* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
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.
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.
* 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.
- 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).
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)
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.
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.
This is wasteful on multiple aspects:
- Binary size: Around 20% binary size reduction with exceptions disabled
for both MSVC and GCC binaries.
- Compile time:
* More than 50% build time reduction with MSVC.
* 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.
Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
The FontDrawer used in TextEdit was previously not being flushed before drawing auto-completion boxes. This was causing rendering artifacts.
This PR also increases the backward compatibility of the MultiRect OFF mode, by forcing a flush after each character.
Adds optional hierarchical culling to the 2D rendering (within VisualServer).
Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
The bound Rect2 was previously incorrect because bone transforms need to be applied to verts in bone space, rather than local space. This was previously resulting in skinned Polygon2Ds being incorrectly culled.
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.
Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.
Later logic using the `pairable_mask` would catch cases preventing pairing callbacks between geometry. However the collision checks were still taking place, wasting performance.
Here we utilize the `tree_mask` feature of BVH to totally eliminate unnecessary collision checks between geometry.
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
Backported from #70885.