* 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.
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
* 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.
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
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios.
Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
- lawnjelly
d2b1d29634
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.
- lawnjelly
b777a9e5f9
Backport of this PR: godotengine#63597
This adds these as new Built-Ins to Spatial Shaders
* Object's Position in World Space
* Camera Position in World Space
* Camera Direction in World Space
* Object's Position in View Space
- paddy-exe
be3d331f26
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.
- lawnjelly
dd6c213dac
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.
- lawnjelly
910ddd13c4
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.
- lawnjelly
18d7d36b63