Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
C++ graphics-rendering Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Project mention: Show HN: Realtime Global Illumination on Older Hardware [video] | news.ycombinator.com | 2023-07-24Hi everyone,
A few months ago I posted here on HN about my open source 3D rendering engine. Since then I've been working on the new version which implements additional modern graphics techniques while still running on older GTX 10 series hardware.
This includes emission mapping, FXAA+TAA, better mesh LOD generation and selection, but the biggest one was an overhaul of the global illumination system.
The global illumination overhaul was the biggest aspect of the new release. The goal was better visuals than the previous version while maintaining equal performance. I wanted to outline how it works and what I had to do to make it work.
= How It Works =
* Direct lighting: Handled using standard rasterization pipeline with cascaded shadow mapping
* 2nd bounce of light: Approximated by a set of virtual point lights
* 3rd bounce of light: Not directly simulated but shadows are tapered to prevent harsh cutoff. VPLs can also be placed in open spaces to help spread light where it wouldn't be able to go without a true 3rd bounce.
* Adaptive sampling: maximum of 4200 virtual lights per frame are selected. Each pixel computes lighting using between 1 and 10 random samples based on object's distance to camera and whether or not the lighting history was recently discarded for that pixel (recently discarded = temporarily sample more heavily).
* Spatial resampling: each pixel can look at a few of its neighbors each frame. If the neighbor is a good fit it will merge that neighbor's samples into its own to increase the effective sample count.
* Denoise and temporal accumulation: 2 level wavelet denoiser combined with temporal accumulation to get rid of most noise and stabilize the image even when in motion.
= Maintaining Performance =
There are a few key ways that this version is able to both look better yet have the same performance as the previous version on the same hardware.
1) Reuse as much data as possible between frames. This is where the temporal accumulation aspect comes into play.
2) VPLs are updated slowly over many frames to prevent any single frame from halting the system.
3) With thousands of VPLs per frame, they can't all be factored in for each pixel. It's too much work. The approach was to instead sample from the set of VPLs randomly, reuse as much data spatially as possible, denoise the result and temporally accumulate 1 second worth of frames.
I'm very happy with the results! Roughly the same performance as the previous version but better visuals.
GitHub (open sourced under the MPL-2.0 license): https://github.com/KTStephano/StratusGFX
Image Showreel: https://ktstephano.github.io/portfolio
High-Level Tech Breakdown: https://ktstephano.github.io/rendering/stratusgfx/frame_anal...
C++ graphics-rendering related posts
- Depth buffer not working on neir automata
- Really sad to announce the SSAO bug IS NOT fixed in Warhammer 3
- Using DOF in multilayer car game?
- The reflection doesn't work
- Depth Buffers Access Denied Due To High Network
- Reshade 491 Is Out Fixes Issues With Cyberpunk
- Reshade 482 Is Out Fixes Issues With Pooled
-
A note from our sponsor - InfluxDB
www.influxdata.com | 27 Apr 2024
Index
Project | Stars | |
---|---|---|
1 | StratusGFX | 605 |
2 | Reshade-Unlocked | 99 |
Sponsored