Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Correct and slow terrain render #105

Open
kvark opened this issue Jan 5, 2020 · 1 comment
Open

Correct and slow terrain render #105

kvark opened this issue Jan 5, 2020 · 1 comment

Comments

@kvark
Copy link
Owner

kvark commented Jan 5, 2020

All the currently implemented terrain renderers in this project are approximate. Each having its own set of compromises between the speed and quality. It would be useful to have a method as a quality baseline: something that would render ideally well, even if it's very slow.

Here is such method:

  1. find out the XY area of the terrain that may end up affecting the screen
  2. find out the mapping from instance ID to each and every point to this area
  3. launch an instanced draw that would draw lines: one for the lower chunk, one for the higher chunk

With depth write enabled, and some trickery to make the front texels drawn first, this can end up in an acceptable performance.

Technically, that would be "true" Painter's algorithm, unlike the current compute scattering method.

@kvark
Copy link
Owner Author

kvark commented Jan 5, 2020

Basic version is implemented in 53abc69
It's not yet fully correct though, the distribution needs to be worked out.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant