3 ms·
Nontrivial renderers always make use of acceleration structures, and that’s actually much harder to implement with SDFs. At least with polygons, you can very pr
by jb1991 5y ago
Nontrivial renderers always make use of acceleration structures, and that’s actually much harder to implement with SDFs. At least with polygons, you can very precisely divide up your space or your objects and know exactly in which region what it is you’re hitting. You don’t get that benefit so easily with complex SDFs and thus many optimizations are not available.
- whizzter 5y agoThere was a really interesting paper here on HN a few months back, basically if your SDF was data based you could do a low resolution pruning pre-pass over the screen and remove the datapoints of the SDF that didn't contribute anything in that screenspace region. Other than that you can actually re-use many simpler SDF's to work as bounding spheres,etc. For example I did a kind of skinned character rendering that kinda started turning expensive and a simple way to accelerate it was to first do a sphere calculation that bounded it, if the sphere calc was producing a large enough value it was output directly instead of the "detail" value of the actual character. Now for a GPU that isn't ideal if one of the "threads" enters the character, but I think most GPU's do triangles one-tile-at-a-time so these threads will most of the time have converging calculations within each tile.