Hacker News new | ask | show | jobs
by tom_0 4303 days ago
Hey, Tommaso here. I've thought about using a depth prepass, however that really helps only if you have heavy shaders, at the cost of basically doubling the vertex shader load. Given that our terrain shader is an one liner which returns tex*color, and that we have A LOT of vertices, it's not very convenient. The poly count at max render distance (224 blocks) can be anywhere between 300K in plains and 900K polygons in jungles, minus the savings of the culling in the post. Apart from jungles which kill everything though, the major bottleneck is now alphatesting and most devices will run at 60fps if you turn that off.
2 comments

Hello Tommaso, I developed something VERY similar to that algorithm back in 2007 (C++, software rendering), and then again in 2012 (in Java for Android, with GLES).

I got some of your issues fixed back then. Ravines, for instance. You might want to take a look:

(3-clause BSD): https://github.com/TheFakeMontyOnTheRun/derelict/blob/master...

(GPLv2): https://garage.maemo.org/plugins/scmsvn/viewcvs.php/angstron...

Don't hesitate to get into touch. I will gladly explain anything.

I'm not looking for money. I'm just trying to help. I always felt bad for this algorithm to just gather dust. That post of you made my day.

Thanks for the reply. That makes sense; my scenes are probably 100-200k, but my fragment shaders are much more complex so the depth pre-pass makes a huge difference.