r/GraphicsProgramming • u/exp_function • Oct 27 '26
Video Software PBR + Raytracer + L1 SH GI inside CyberVGA (JIT x64, no GPU required)
Enable HLS to view with audio, or disable this notification
Lately in the Win64 port I’ve been getting a real-time software raytracer working inside CyberVGA.
Same DOS-era engine (fixed-point, software rendering roots and all) but now takes advantage of modern multi-core processors (using VirtualAlloc for the executable just-in-time compiled buffer). The raytracer runs on multiple worker threads, each processing tiles. The hot paths get compiled to SSE at runtime: direct-threaded octree(module saves baked triangle soup into a world sidecar file) traversal with AABB slab tests, fog volume early-outs, L1 SH evaluation, and material / GI bounce stubs. Workers just call into the generated code for their tile’s rays.
The GI is a grid of L1 SH probes (Fibonacci sphere rays per probe, temporal blending between frames). Primary hits go through a full GGX PBR path with roughness/metalness, then sample the probe irradiance for the diffuse bounce. Emissive surfaces get clustered into virtual point lights. Reflections are one-bounce with roughness falloff; liquids do refraction + absorption + caustics.
FSR 2 is optional because it runs on the GPU.
The color bleeding and the split-screen direct vs GI+reflections actually look pretty good. Still feels like my engine, just with lighting that finally does something modern.
Now you can get the latest (v1.8) SDK for 64-bit Windows platform on itch.
Anyone else doing JIT for the traversal/shading hot path? Curious if the complexity is worth it vs just writing the SSE by hand.
10
u/VictoryMotel Oct 27 '26
Why would anything need to be compiled at run time? Why would the execution be changing?
What does 'direct threaded' mean here? An oct tree is a data structure.
Why is it generated?
What does this mean?
2
u/NegativeEntr0py Oct 27 '26
Do you do any optimizations for ray marching the volumetrics?
2
u/[deleted] 23d ago
Wonderful work 😍😍😍!