BVH Accelerated Shading

Found a nice article:

Author suggests using a BVH-tree to shade pixels. The fragment shader looks up light contributions using the world coordinate and a BVH-tree of lights that is built on the CPU side. Sounds like a nice hack to try out in jME, if only there was more hours in a day :slight_smile:

2 Likes

That’s quite interesting… It allows you to get most of the benefits of deferred lighting without any of its downsides.

This really sounds as an interesting alternative approach to normal deferred lighting.

I can’t follow his gpu BVH struct with only a hitIndex and a missIndex.
And to get most out of it, it would require to have a deep graph, while i suspect most users have a wide scenegraph.
Nervermind the above, don’t know why i had the idea for just map the scenegraph to the gpu.
But very nice technique

Indeed a nice technique to try. Copied from the summary in the blog for who really lazy.

Pros of BVH Accelerated Lighting:
Very easy to implement, minimally invasive on your render pipeline
Doesn’t suffer from inherent depth complexity issues as in 2d/3d tiled methods
Doesn’t require a compute shader or and additional passes
Can be used with Forward and Deferred renderers
Cons:
Requires tree traversal which has logarithmic complexity in the
number of lights, where clustered shading with a 3d texture is more or
less a constant lookup time.

I would like to try it with just a few hundreds of lights because practically I only need less than 30 to lit my scene in common games. Any one trying already?