DethRaid / AndroidRenderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build a GV for the LPV

DethRaid opened this issue · comments

We need to create a GV for the LPV. There's a few ideas on how to do this

One idea is to build a 3D rasterizer in compute shaders. This has some advantages. A major one is that we have ful control over the rasterization pipeline and can easily implement conservative rasterization. I've already implemented this and found that it takes about 8 ms per frame on my RTX 2080 Super. I'd like to get that down to 1 ms

Another idea is to implement the original GV from the cascades LPVs paper. We can use the player's depth buffer from last frame and the RSM's depth buffer, and inject them into the appropriate volumes with SH. This will probably work alright. I'm worried about light leaking from occluded surfaces, but we'll see

A third idea is to build a 3D GV for each mesh offline, and add it to the per-cascade GV at runtime. This avoids the high runtime cost of voxelization, while still giving us full control over the rasterization pipeline.