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.
This fix works in both GLES3 and GLES2.
The rendering formula in the shader was adjusted to further improve the
sharpness/antialiasing quality balance.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
* 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.
Logging is now allowed in any TOOLS build (rather than just in the editor), but still prevented in final exports.
Logging can be switched off via project settings.
Autoplacement is now logged.
- 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)
Allows a non-interpolated particle system to closely follow an interpolated target without tracking ahead of the target, by performing fixed timestep interpolation on the particle system global transform, and using this for emission.
Changes the implementation of non-interpolated global mode particles so that the vertices are specified in proper global space instead of local space (vertices were previously back transformed by the inverse of the parent transform).
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.
As a convenience, physics interpolation is reset automatically on entering the tree. This will be desired in most situations, and saves the user having to write code for this explicitly.