u/Elorth-

Noob question, in a Voxel + SDF in subpixel space, how would you reduce the cost of grazing angles?

Legend:
- Blue: less expensive, raymarch converges faster
- Red: more expensive, raymarch converges slower

u/Elorth- — 6 days ago
▲ 1 r/VoxelGameDev+1 crossposts

Just found a very simple almost stupid optimisation in HC's voxel renderer

On trace alone, we get from 25 to 36, or 44% increase! Not sure if 44% is reasonable in every scenario, but that's still something that good to take!

I found an opportunistic way to optimize the raymarched renderer that was fairly simple. I never tested whether a ray exited the voxel domain when it entered one!

So basically, when a ray entered the voxel bounds and wasn't touching any shape, it would eventually leave the bounds, but would continue evaluating the SDF function for... nothing.

That's crazy, thinking this simple optimization was there all this time 🤯

(blue screenshots are render cost per pixel, blue fast, red slow)

u/Elorth- — 6 days ago