Distance fade: sim-surround sculpts and terrain don't haze when flying high #158
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#158
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?
Flying high above a sim, big sculpts (sim surrounds) and terrain don't fade into the haze like the rest of the objects, so they stand out sharp against the faded scene.
Cause
clean_draw.fragskipsatmosDistanceFadefor fragments with VS flag bit14 ("encloses camera").clean_draw.vertsets that bit when the instance's bounding sphere contains the camera. The exemption was made for weather domes / skyboxes the viewer sits inside: fading them by depth replaced a ~750 m dome with the sky.The sphere test is far too coarse for large, flat objects:
#VKHuge#log line keeps reporting one, size 1451 m), so their sphere has a radius of ~700 m. Flying anywhere above the sim puts the camera "inside" it, and the whole object is drawn unfaded.Fix direction
Make the exemption match its purpose (things around you, like domes and skyboxes) instead of "bounding sphere contains the camera":
32uskips some haze branches inclean_draw.frag; confirm it getsatmosApply+atmosDistanceFadelike other world faces).Test: fly to a few hundred metres over a sim with a sculpted surround and look down and toward the horizon. Surround, terrain and objects should all fade together, and a weather dome / skybox you're inside must still render unfaded.
Related: #150 (below-horizon fade target).