Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.15k stars 82 forks source link

Ray Tracing bringup #261

Open Try opened 2 years ago

Try commented 2 years ago

This ticket is to track ray-query/ray-tracing work

command line: Gothic2Notr.exe -rt изображение

Issues:

Try commented 2 years ago

First bring up: изображение

RQ is done only for landscape mesh, at deferred lighting pass

Try commented 2 years ago
Notes: blas/tlas performance is quite inconsistent. Having same landscape geometry at one mesh and as multi-mesh about 4x fps difference: FPS Method
40.4 multi-mesh land + objects
40 multi-mesh land
200 objects
185 single-mesh land
163 single-mesh land + obj

GPU is RTX 3070

This performance change can be explained by: https://developer.nvidia.com/blog/best-practices-using-nvidia-rtx-ray-tracing/ :

Organizing geometries into BLASes
Consider splitting a BLAS when there is a lot of empty space in an instance’s world-space AABB. World-space AABBs are used to test whether a ray potentially hits an instance and traversing its associated BLAS is required. A significant amount of empty space can lead to unnecessary traversal through the BLAS. Geometries that move independently should usually be in their own BLASes. Merging them into a single BLAS can easily lead to an AABB with lots of empty space, and likely lead to unnecessary rebuilding of the BLAS instead of simply changing transformations of the independent instances.

Still annoying; material indexing is gonna be more difficult

Try commented 2 years ago

New screenshot: indoor case. изображение

Try commented 2 years ago

Bindless turnout to be non-trivial in many ways, works only on Vulkan backend for now, with texture-array capt at 4096 unique textures. More about Bindless problems: https://github.com/Try/Tempest/issues/36 изображение

Try commented 1 year ago
Снимок экрана 2023-07-03 в 20 22 41

Metal3: 12fps in mac-air... but at least works

Try commented 1 year ago

Metal3 bindless: изображение