inexorgame / vulkan-renderer

A new 3D game engine for Linux and Windows using C++20 and Vulkan API 1.3, in very early but ongoing development
https://inexor.org
MIT License
777 stars 34 forks source link

Remove triangles of adjacent cubes which are not visible #475

Open IAmNotHanni opened 2 years ago

IAmNotHanni commented 2 years ago

Is your feature request related to a problem?

We currently keep the triangles which are not visible because of adjacent cubes. If two cubes of type CubeType::SOLID are adjacent to each other, 2 * 2 = 4 triangles are never visible, but they are still being stored in the vertex buffer.

Description

We must remove those vertices which are never visible.

Alternatives

Keep the triangles, even if they are not visible, reducing rendering performance.

Affected Code

The octree code

Operating System

All operating systems