Thanks, it’s always nice to hear when ppl like the game
I don’t use SSAO as it only takes in account the visible geometry (= screen space). The problem with that is, that while it might look good on the surface, it will look unrealistic within caves as they should be totally dark most of the time but they wouldn’t be with SSAO.
So what I actually do is I have a 3D texture of light values (I call it a LightDistributionMap) that are computed when the sector is constructed. Basically all light flows down from the top (from the sun) and is then smeared along the x/z-axis. So in the shader I just use the LightDistributionMap texture and calculate my lighting by using the normals of the surface and get the light value where these normals point at. And using more than one sample interpolated gets me this quite smooth look of the blocks But still the calulcation of these LightDistributionMaps takes quite some time (around 600ms per sector) so that I might still have to change a few things …