Paracetamol56 / Aminophenol-Game-engine

3D game engine written in C++17 with the Vulkan API
Apache License 2.0
0 stars 0 forks source link

Add depth buffering #26

Closed Paracetamol56 closed 1 year ago

Paracetamol56 commented 1 year ago

The problem

Image

Faces are rendered on top of each other, ignoring the depth.

Solution

We need a depth buffer per frame to store depth data and render only the nearer faces. Vulkan tutorial Vulkan guide

Paracetamol56 commented 1 year ago

Result:

image