Opaque geometry and translucent globe z-fighting
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
From https://github.com/CesiumGS/cesium/pull/8726#issuecomment-618777065
Geometry on the globe (not ground primitives) can have z-fighting artifacts with the translucent globe.
Depending on the zoom level and geometries involved the terrain geometry may sometimes render above the primitive geometry. This happens even when the globe is opaque, but `globe.depthTestAgainstTerrain = false` exists to clear the globe depth before the opaque pass so that z-fighting doesn't occur.
The problem with translucency is that globe tiles get rendered in the translucent pass, after the opaque pass, and it isn't possible to avoid z-fighting unless a more complex layering system is in place.
[Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html#c=rVZtb9owEP4rFp+YRE1Ay9ZSWq2ie5OYNrVVJ62pKpMcwatjI9uB0an/fee88RJY2w1EQnL3nO/s5x6bGdMkfEgEOSE3gSTkt7sRwqMeCRqRCtMEpA0ardwsWQLOMfjxZUg+gkrAag6mRy4gtEzGAiroDLThSjp0h3qF+bFVy6EhqgeXeeCX1WkEEdHZVcDInNsJGQkW3hOVWsHlMrIC9co0hIRK6YhLZl2llZWQuQF5DrEGZ7856HS9FnmN10Gng3ffu22V2MfqaQI8ntgeeeO5T2UuC/1UuJeeMReiR9ALlSnBSjRnYq0YowSPBkoovWZ21ddtOM94xLDoru+3MJn7dryVgteLXn1ePhVLt1FcYa1XUmT0ynyYur5Aj7toNtgoU9jNdI3cFNqOGUnySLMXhj2/YPjIf4rgf2AwK3SDKYX6kJbZQgrX7y+uPg/OhtVsivaZgSxXfGWhS3bdUq/RieNG0ZaAMmZLgIYpMJyX/9eu2MnfAoRQ82cpdY3IPG6fMj0qVXq4b5GOmTDwn/Iol3+3RKoxvvPITnqkW9m1KhvFo/5ThFicTaqfryiesBhahI3UDIhJ9ZiFe6HjbSkp3/Hiv4CO5+oqq3xDVqWNpJq7yVLazkymPQDD0+RuqGJ1l7FEf07joLGhhqc31eWt0z18yca6ZOz2OJCBnOEJO+MwB41nrIQ5ySuk15mtGTTC7H2gcJvArtBB49VxHhUxyy5VqkP4plXCDeAARfAAj+zzyk2FYlHTHeNZaDYwXUYbyqKoWRttBfugVHKltkPyWmKhRi5/EWBCkEAzI0KyX2o1k0ak6AkXFCQbCdwOTjKCt2PGGuf8AfvwTEwnDKHY9tuRIzzq14HecaPV6Bu7EHBaMvCOJ1OlLfaEaGJDWEimwrVve5SG92BpaIybkIP226uh/YjPUFYnW7ggoWDGoGecCnHJH1Azp/024muhjgMu46/4x0ewhYNNOqfD3Egp7bfxdXukVUqMmF4ZOUf8AQ)

Contributor guide
Research direction
Start by reproducing the artifact with the linked Sandcastle example and compare it with the attached recording. Investigate the globe's opaque and translucent rendering passes and determine a layering approach; done means globe geometry no longer z-fights with translucent terrain across the reported zoom levels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100