Flickering shadows, stars and more at high altitude (Z ~3000): precision -- make it camera-relative #555
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#555
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User report (via the owner): at about 3000 m altitude (Z = 3000; skyboxes are commonly built there), the user sees flickering in:
Likely cause: precision. Something is computed in region or world space with 32-bit floats when it should be camera-relative: transforms, light/shadow matrices, sky dome/star positions, or depth reconstruction. At Z of about 3000, float32 resolution is about 0.24 mm in position, but errors compound once positions get multiplied through view-projection matrices built in world space. They're also amplified by:
Investigate (GPU-driven VK pipeline):
Repro: rez a platform at Z 3000 (or teleport to a skybox), stand still, enable sun shadows, watch shadows and stars. Compare with the same scene at Z 30.
Done when: no flicker or shimmer at Z 3000 (also check 4000+, up to the 4096 build limit, and higher where avatars can fly), and nothing changes near the ground.
Merged in from #519 (the in-viewer report from the same user, on 1.0.1.1, region "The Mares Nest"; the reporter's home parcel is high up). The symptoms they described there:
All consistent with precision loss at high altitude. The big shadow that follows the player may be the coarse cascade or a shadow-map edge being placed from badly conditioned world-space maths.
Floating-origin precision fixes shipped in v1.2.0-beta.4; reporter was on 1.0.1.1. Closing as fixed; reopen if shadows/stars flicker at high altitude on current builds.