Jump to content

Clustered Forward Rendering Progress


Josh

2,614 views

 Share

In order to get the camera frustum space dividing up correctly, I first implemented a tiled forward renderer, which just divides the screen up into a 2D grid. After working out the math with this, I was then able to add the third dimension and make an actual volumetric data structure to hold the lighting information. It took a lot of trial and error, but I finally got it working.

Image1.thumb.jpg.9b71afe25102968c615183fe3708d118.jpg

This screenshot shows the way the camera frustum is divided up into a cubic grid of 16x16x16 cells. Red and green show the XY position, while the blue component displays the depth:

Image5.thumb.jpg.0e3b55e926fdfe12a4d200e9b4fbf2a8.jpg

And here you can see the depth by itself, enhanced for visibility:

depth.thumb.jpg.3a10d81714732447b3f61ea150168ec2.jpg

I also added dithering to help hide light banding that can appear in gradients. Click on the image below to view it properly:

dither.thumb.png.551af10c9d59892fb5f16808e550c0bb.png

I still have some bugs to resolve, but the technique basically works. I have no complete performance benchmarks yet to share but I think this approach is a lot faster than deferred rendering. It also allows much more flexible lighting, so it will work well with the advanced lighting system I have planned.

  • Like 1
 Share

1 Comment


Recommended Comments

If you're still willing to Port this to Leadwerks, curious how much of a performance boost this will be. The lighting seems nicer than what's present now.  

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...