-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize Voxel Rendering #45
Comments
Code to do this on a chunk and on a voxel level is implemented in our chunk On Sat, Mar 28, 2015 at 1:19 PM, tehul notifications@github.com wrote:
|
I was mostly talking about improving the conditionals here so they can check voxels in neighboring chunks. I'm not sure I see this in your branch (this maybe?) so I'm still gonna consider this as non-implemented. You can cover this if you want, but I highly recommend getting a pull request to fix the graphics issues and crashes you're seeing first. Development without feedback isn't exactly easy. |
Currently, the voxel engine renders the sides of chunks even when two chunks are next to each other. To illustrate this, suppose we have a layer of square voxels being rendered in the world,
It’s a lot of graphics overhead to render all those inner voxels, so we should probably ignore them. Currently, the world does ignore rendering voxel sides that are next to each other, provided they’re in the same chunk.
However, if two voxels are next to each other but in separate chunks, the voxels’ sides still get rendered.
This should be optimized so it ignores those inter-chunk textures. This problem can be seen if you navigate the camera inside the world right now.
Parallel Analysis
When updating a chunk’s vertex buffer for rendering, each chunk needs to examine all neighboring chunks around it.
If we were to update a large grid of chunks, this would be open to a parallel stencil pattern for optimization. If we’re updating n chunks, the work has O(n) complexity. The span would be the time required to update one chunk, which has O(1) complexity. Thus, the maximum speedup we can expect in this task from adding more cores is,
Meaning this algorithm will scale.
The text was updated successfully, but these errors were encountered: