Sergey Kosarevsky's banner
Sergey Kosarevsky's profile picture

Sergey Kosarevsky

@CorporateShark2,198 subscribers

Worked at Ubisoft/DAQRI/Blippar/Layar/Yandex Co-authored (Vulkan) 3D Graphics Rendering Cookbook, Mastering Android NDK, Android NDK Game Development Cookbook

Videos

CorporateShark's profile picture

Some late-night vibe coding with Claude. This time I tried implementing the paper "Real-Time Ray-Traced Ambient Occlusion of Complex Scenes using Spatial Hashing" (by Pascal Gautron) using LightweightVK. The starting point was a basic working ray-traced AO demo without spatial hashing which I already had - just stochastic noise jittered every frame. The main goal was to push the visual quality to a level I personally consider acceptable. It’s still not production-ready (the code is pretty unoptimized and messy), but at this stage I was quite happy with the visuals. I'd rate it about 4 out of 5. Claude started off very strong by outlining the required changes to support the new spatial feature: a list of new buffers, updates to the GLSL/Slang shaders, and modifications to the rendering loop. The first iteration didn’t work at all, but after about 10 minutes of refinement, Claude managed to get the first working version up and running by itself. At that point, once the first version was working, it started mixing cached AO with directly ray-traced AO in the same frame and kept insisting the task was complete. After I explained the issue, Claude fixed the problem in two iterations. The real visual work started after that. The naive spatial hashing implementation led to rapid hash table thrashing. When it came to heuristics, Claude wasn’t much help. That part required a lot of manual intervention from my side - going back and forth, suggesting specific heuristics to try (“do this one and this one, then I’ll compare them visually” etc.). After roughly 4 hours of work, this is the result you see in the video. 🤗 Running on Samsung Galaxy S26 Ultra.

Sergey Kosarevsky

38,292 views • 3 months ago

No more content to load