zukonake / lux-client

2 stars 0 forks source link

Depth buffer bottleneck #4

Closed zukonake closed 6 years ago

zukonake commented 6 years ago

Currently due to a high number of fragments tested to the depth buffer, there is a rendering bottleneck. Possible solution would be to dismiss chunks that are guaranteed not to be visible.

zukonake commented 6 years ago

This can be easily solved if chunk boundaries quads are checked as any other block is, this will tremendously reduce the number of quads for mostly solid chunks, the solution is probably not trivial.

zukonake commented 6 years ago

One way to do it, is to load chunks first, and then mesh only chunks that have their neighbours loaded.

zukonake commented 6 years ago

The issue persists in undergrounds, many rooms and walls that should not be visible are rendered anyway, some occlusion is needed.

zukonake commented 6 years ago

It is possible that this issue is caused by the number of faces/vertices, not the depth buffer. In fact the performance is higher with depth buffer enabled due to early z-discard and distance sorting implemented in 59aed28f30b6b1f24fd848418fe4e48d490ad975.