Have a question regarding about my voxel engine. Since now I am basically at the point of maximize my performance for my engine on which has going outstanding, being able to reach 600fps sometimes, but there's a some problem that I been stuck on for a week now, and it kinda sucks.
So as I just before about my performance being great and all, well that drops down to like 70fps which is very bad. The main reason because this is that ever since I added cave generation to my game the generation was still very fast, but the rendering of the chunks is soo bad that it is basically after frustum culling is done the chunks behind the once that where checked as though frustum culling are being render. Their is my problem, you see I really only need to render the chunks that follow these steps.
- Is visible by frustum culling (already true).
- Check to see whether if any chunks is block the view from the camera (like if there a chunk that is full solid in the way).
So anyways, some solutions that I tried to fix the problem was to everytime when the player changes chunks it will check the visibility grid in order to see if the chunk is visible by the camera or not blocking by any chunks. Well I use a flood fill algorithm that helps to a certain amount. So when the flood gets to the edge of a chunks border it will check that chunks face as can pass through and camera can probably see.
I hope any could share their ideas or something, thanks for your time. see