summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland/wayland_thread.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2024-07-03 18:31:07 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2024-07-03 23:53:24 -0700
commit4e9e35b58a5f6ddc25e7de5c93b351f574e50468 (patch)
treec6767761db37e51ea82539b035cb86cd24599150 /platform/linuxbsd/wayland/wayland_thread.cpp
parentcae2f853dcd1ecc26ca68de08cec62089dee1f26 (diff)
downloadredot-engine-4e9e35b58a5f6ddc25e7de5c93b351f574e50468.tar.gz
Fix AABB computation for position compression to not depend on vertex order
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.
Diffstat (limited to 'platform/linuxbsd/wayland/wayland_thread.cpp')
0 files changed, 0 insertions, 0 deletions