This adds support in all backends, but the Compatibility renderer works the best.
Mobile and Forward+ can only support one directional light shader (the first in the tree)
While the Compatibility renderer supports any number of shadows.
Co-authored-by: Clay John <claynjohn@gmail.com>
Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
The previous computation was dependent on the vertex order in two ways:
- If the first vertex was on the AABB boundary, the AABB would be
increased by the epsilon due to size clamping
- Every time the AABB would get expanded, we would recompute end from
size and reconstruct size again, which resulted in slow floating point
drift.
In isolation this may not seem like it matters, but it means that the
same mesh with a different vertex order may result in a slightly different
AABB. This can be a significant issue due to shadow meshes and their use in
depth prepass: shadow meshes reorder vertex data as part of the
deduplication process, as they append one unique position at a time and
as such remove the duplicate positions; this can result in a different
AABB which would result in a different reconstructed vertex position
during a depth pre-pass, causing mesh self-occlusion.
- Bind MAX_MESH_SURFACES constant in RenderingServer::_bind_methods()
- Add MAX_MESH_SURFACES constant to RenderingServer class documentation
- Reference the constant RenderingServer.MAX_MESH_SURFACES in the description of Mesh class documentation
* Servers now use WorkerThreadPool for background computation.
* This helps keep the number of threads used fixed at all times.
* It also ensures everything works on HTML5 with threads.
* And makes it easier to support disabling threads for also HTML5.
CommandQueueMT now syncs with the servers via the WorkerThreadPool
yielding mechanism, which makes its classic main sync semaphore
superfluous.
Also, some warnings about calls that kill performance when using
threaded rendering are removed because there's a mechanism that
warns about that in a more general fashion.
Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
- Supporting custom AABB on the MultiMesh resource itself allows us to prevent costly runtime AABB recalculations.
- Should also help improve CPU Particle performance.
Adds a new system to automatically reorder commands, perform layout transitions and insert synchronization barriers based on the commands issued to RenderingDevice.
This extends our previous change to ensure that compressed meshes have tangents
Now we ensure tangents are always used. This greatly simplifies our compression code at the cost of a small amount of bandwidth