SUP KINGS
This is a big one. Developing against my min-spec device with only 4GB of VRAM has been fruitful, as it has forced me to optimize to the bone to get to 60 fps performance (w/o framegen) and ~97% voxel coverage in levels like E2L8 that are full of varieties of enemies. Average frame rate in my pre-recorded replay of E2L8 now sits at a cool 87fps over a 165s session on my 5070 Ti, and we're averaging 60fps on the Radeon RX 6500 XT in FSR3 ultra performance.
Check these numbers from my min spec device runs:
- Frame time: 22.53ms avg -> 16.27ms (-6.28, >60 FPS average)
- CPU frame time: 19.90ms -> 13.18ms (with late-level drift cut by ~80%)
- GPU ray tracing (trace_dispatch_ms): 11.22ms -> 8.91ms
- VRAM (DXGI Local): ~2,462MB -> 1,836MB (-626 MB, freeing enough headroom for 100% voxel enemies on 4 GB, but some props left behind in sprite land)
Installation Instructions
Windows
- Purchase and install Duke Nukem 3D: 20th Anniversary World Tour (or otherwise have it installed on your computer - you need a commercial version of Duke 3D to use with the Duke-RT engine fork)
- Download the .zip file in the assets section from this release
- Unzip Duke-RT to your computer
- Run launch-duke-rt.cmd in that folder
- Give it the path to your Duke 3D install (if it doesn't find it automatically)
- Let it grab the normal maps from Duke World Tour (if that's your Duke version, will still work without them)
- Let it open your browser to grab the voxels
- Download the voxels from that site
- Go back to the Duke-RT console window and hit enter
- Let it unpack the voxels into its own directory for you
- Proceed into the game
- Always run via launch-duke-rt.cmd in the future
Linux
- Purchase and install Duke Nukem 3D: 20th Anniversary World Tour (or otherwise have it installed on your computer - you need a commercial version of Duke 3D to use with the Duke-RT engine fork)
- Download the Linux tarball in the assets section from this release
- Untar Duke-RT to your computer
- Run launch-duke-rt.sh via CLI from that folder
- Give it the path to your Duke 3D install (if it doesn't find it automatically)
- Let it open your browser to grab the voxels
- Download the voxels from that site
- Go back to the Duke-RT console window and give it the path to your voxel zip file
- Let it unpack the voxels into its own directory for you
- Let it grab the normal maps from Duke World Tour (if that's your Duke version, will still work without them)
- Proceed into the game
- Always run via launch-duke-rt.sh in the future
What's changed
- voxel memory compaction and batching
- improved voxel geometry representation (eliminated unnecessary precision, leveraged palette data) for 5.4x memory reduction on generated voxel geometry - the lion's share of data resident in VRAM
- further reduced geometry complexity with better greedy meshing to merge coplanar faces that share palette entries
- parallelized scanning, batched loading, and incremental runtime BLAS compaction - 66.4% BLAS size reduction
- also migrated raw kvx slabs to tightly packed bitfields to save ~128MB VRAM (and system memory)
- allows 97% of voxel actors in E2L8 to fit in 4GB VRAM, and greatly reduced geometry copying
- hardware ray-tracing improvements
- actually started using correct bitmask so overlapped but hidden geometry rejects in BVH hardware rather than in shader, for a monster 3.74ms GPU time improvement in worst case scenarios
- split "transparent" geometry like fences or grates into their own alpha BLAS to address some RDNA2 multi-geometry DXIL bugs
- dedicated TLAS mask bit for translucent effects like force field impacts to let hardware skip tracing the rest of the map
- Composition.cs.hlsl cleanup to reduce double work, terminate shadow rays on first hit, etc.
- spatial overlap management improvements (Build engine stuff)
- pre-compupted half-spaces rather than doing heavy lifting during ray traversal, producing another 1.95ms GPU time savings in some bad cases (and a lot of TraceOpaque code reduction)
- materials and lighting
- dumped linear translucent scans for MaterialFlag_TranslucentEffect - 0.81ms savings!
- converted persistent voxel materials to zero-copy span - oops
- dirty-slice-only hashing with tracked uniform material ranges so pre/post-light policy only touches changed blocks - from linear time to constant
- outer frame times (CPU) down by a massive 4.4ms on average and 8.37ms in worst cases, as well as massive reduction in copied bytes
- bugs/leaks
- voxel admission scheduler now evicts terminal tokens and drained queue entries - saved 1.16GB of RAM during course of E2L8 and reduced voxel admission times drastically
- stopped deep-copying gSprites table 4x/frame, instead indexing in place and caching actor family inspection/texture dependencies
- budget-contraction hitch guard/deferral until post-budget checks pass - eliminated many hitches
- stopped doing 30,000 CPU raycasts even when nri_ptsurfaceprobe == 0 - oops
- achieved complete elimination of frames over 100ms on min-spec machine
What's next
- AMD smoke
- Some fluid cleanup
