Reduce terrain memory usage
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
#4339 increased the amount of memory needed for a terrain tile. Here are some ideas from @kring to reduce this:
- Include the vertical geographic and/or web mercator texture coordinate, but not both unless we actually have two different imagery layers with two different projections. Aside from the complexity of managing optional vertex attributes like this, we also need to worry about other things that use the texture coordinates, like the water effect.
- Eliminate the height. It's used for upsampling, and it's used in 2D and CV. We could handle the upsampling case by storing the heights separately (they don't need to be sent to the GPU). And of course 2D and CV don't matter if you're using the 3D-only option. But this is a lot of complexity and most applications won't benefit because they don't disable 2D and CV. We could at least let every app get some benefit by creating meshes for 2D and CV on the CPU (when displaying those views) rather than using vertex shader displacement.
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by reviewing #4339 and the terrain-tile memory changes, then determine which texture-coordinate or height-storage approach is in scope; completion should reduce terrain-tile memory usage while preserving the required 2D, CV, upsampling, and water-effect behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100