In this post, Volume Tiled Forward Shading rendering is described. Volume Tiled Forward Shading is based on Tiled and Clustered Forward Shading described by Ola Olsson et. al. . Similar to Clustered Shading, Volume Tiled Forward Shading builds a 3D grid of volume tiles (clusters) and assigns the lights in the scene to the volumes tiles. Only the lights that are intersecting with the volume tile for the current pixel need to be considered during shading. By sorting the lights into volume tiles, the performance of the shading stage can be greatly improved. By building a Bounding Volume Hierarchy (BVH) over the lights in the scene, the performance of the light assignment to tiles phase can also be improved. The Volume Tiled Forward Shading technique combined with the BVH optimization allows for millions of light sources to be active in the scene.
To fulfill the requirements for my Masters in Game and Media Technology (GMT) for the University of Utrecht in the Netherlands, I wrote a thesis on a rendering technique called Volume Tiled Forward Shading. The technique is based on Clustered Forward Shading described by Ola Olsson et. al .
In 2015, I also researched Tiled Forward Shading  and documented my findings here. In that post, I described several areas for improving the Tiled Forward Shading technique. One of the improvement points is to reduce the number false positives (lights that do not contribute to the final shading being added to a tile) that occur within tiles that contain a large depth disparity. Another improvement point was the optimization of the light assignment to tile phase.
The issue caused by the large depth disparity within the tile can be resolved by splitting the tile along the depth in view space. This can be achieved by constructing a 3D grid of volume tiles and assigning the lights in the scene to the volume tiles.
The light assignment to tiles phase can be optimized by first building a Bounding Volume Hierarchy (BVH) over the lights in the scene. During the light assignment phase, the BVH is traversed and only the nodes of the BVH that intersect with the volume tile need to be considered.
Using a grid of volume tiles and constructing a BVH over the lights in the scene, the Volume Tiled Forward Shading with BVH optimization is able to handle millions of light sources in the scene while still maintaining real-time (greater than 30 FPS) frame rates.
To provide a brief overview of Volume Tiled Forward Shading, I’ve created a PowerPoint Presentation.
To demonstrate the Volume Tiled Forward Shading technique, I’ve created a short video. In the video, Forward Rendering, Tiled Forward Shading , and a variation of Clustered Forward Shading  are compared. By constructing a Bounding Volume Hierarchy over the lights in the scene, we are able to show millions of active light sources are supported while still maintaining real-time frame rates (30 FPS).
An application that demonstrates Volume Tiled Forward Shading was created using the DirectX 12 graphics API. The download for the demo contains all of the source code, project files, and a solution file for Visual Studio 2017. Refer to the README.txt file in the root folder for compilation and usage instructions. Pre-built binary executable is also provided in the Game/bin folder. Configuration files for loading different models is found in the Game/Conf folder. Rung the Game/Conf/RegisterFileType_Win10_Rel_x64.bat batch file to automatically register a file handler for the .3dgep extension. Use the UnregisterFileType_Win10_Rel_x64.bat batch script to remove all the registry entries created by the register script.
The demo has been compressed using 7-zip because 7-Zip provides the best compression ratio when compared to WinZip or the Zip compressor built-in to Windows 10. Since the demo was created using DirectX 12, a Windows 10 64-bit computer is required to run the demo. The demo was created using the Windows 10 SDK (10.0.14393.0). If you have a newer version of the Windows 10 SDK installed on your computer then you may need to update the SDK version to the version you have. To do this, open the Visual Studio 2017 solution file in the vs_2017 folder. After the solution opens, right-click on the solution file and select Retarget Solution from the pop-up menu that appears. Select the SDK version that you currently have installed from the drop-down menu in the Retarget Projects dialog box that appears. After you retarget all of the projects in the solution to match the Windows SDK that you have installed, you should be able to compile the solution without errors. Please leave a comment in this post if you still encounter any problems with downloading, compiling, or running the demo.
The file is over 2 GB because it contains all of the source assets that can be used to test the application. All source assets were retrieved from Morgan McGuire’s Computer Graphics Archive https://casual-effects.com/data.
 G. Singer, “The History of the Modern Graphics Processor”, TechSpot, 2013. [Online]. Available: http://www.techspot.com/article/650-history-of-the-gpu. [Accessed: 02- Sep- 2016].
 J. van Oosten, “Introduction to DirectX 11”, 3D Game Engine Programming, 2014. [Online]. Available: https://www.3dgep.com/introduction-to-directx-11. [Accessed: 21- Sep- 2016].
 K. Akeley, A. Akin, B. Ashbaugh, B. Beretta, J. Carmack, M. Craighead, K. Dyke, S. Glanville, M. Gold, E. Hart, M. Kilgard, B. Licea-Kane, B. Lichtenbelt, E. Lindholm, B. Lipchak, B. Mark, J. McCombe, J. Morris, B. Paul, B. Poddar, T. Roell, J. Sandmel, J. Schelter, G. Stahl, J. Stauffer and N. Triantos, “ARB_vertex_program”, Opengl.org, 2007. [Online]. Available: https://www.opengl.org/registry/specs/ARB/vertex_program.txt. [Accessed: 23- Sep- 2016].
 B. Beretta, P. Brown, M. Craighead, C. Everitt, E. Hart, J. Leech, B. Licea-Kane, B. Poddar, J. Sandmel, J. Schelter, A. Seetharamaiah and N. Triantos, “ARB_fragment_program”, OpenGL.org, 2013. [Online]. Available: https://www.opengl.org/registry/specs/ARB/fragment_program.txt. [Accessed: 23- Sep- 2016].
 R. Geldreich and M. Pritchard, “GDC Vault – Deferred Shading on DX9 Class Hardware and the Xbox”, Gdcvault.com, 2004. [Online]. Available: http://www.gdcvault.com/play/1015172/Deferred-Shading-on-DX9-Class. [Accessed: 27- Sep- 2016].
 O. Shishkovtsov, “Deferred Shading in S.T.A.L.K.E.R.”, in GPU Gems 2: Programming Techniques For High-Performance Graphics And General-Purpose Computation, 3rd ed., M. Pharr and R. Fernando, Ed. Pearson Addison Wesley Prof, 2006.
 J. van Oosten, “Forward vs Deferred vs Forward+ Rendering with DirectX 11”, 3D Game Engine Programming, 2015. [Online]. Available: http://www.3dgep.com/forward-plus. [Accessed: 29- Sep- 2016].
 “Downloads”, Crytek.com, 2017. [Online]. Available: http://www.crytek.com/cryengine/cryengine3/downloads. [Accessed: 04- Jan- 2017].
 T. Karras, “Thinking Parallel, Part II: Tree Traversal on the GPU”, Parallel Forall, 2012. [Online]. Available: https://devblogs.nvidia.com/parallelforall/thinking-parallel-part-ii-tree-traversal-gpu/. [Accessed: 05- Jan- 2017].
 J. van Oosten, “Optimizing CUDA Applications – 3D Game Engine Programming”, 3D Game Engine Programming, 2011. [Online]. Available: http://www.3dgep.com/optimizing-cuda-applications/. [Accessed: 06- Jan- 2017].
 “Programming Guide :: CUDA Toolkit Documentation”, Docs.nvidia.com, 2016. [Online]. Available: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html. [Accessed: 13- Jan- 2017].
 H. Zhang, D. Manocha, T. Hudson and K. Hoff, “Visibility culling using hierarchical occlusion maps”, Proceedings of the 24th annual conference on Computer graphics and interactive techniques – SIGGRAPH ’97, 1997.
 M. McGuire, “Meshes”, Graphics.cs.williams.edu, 2011. [Online]. Available: http://casual-effects.com/data/index.html. [Accessed: 02- Jun- 2017].
 “Rasterization Rules (Windows)”, Msdn.microsoft.com, 2017. [Online]. Available: https://msdn.microsoft.com/en-us/library/windows/desktop/cc627092(v=vs.85).aspx#Multisample. [Accessed: 10- Jul- 2017].
 “SAT (Separating Axis Theorem) – dyn4j”, Dyn4j.org, 2017. [Online]. Available: http://www.dyn4j.org/2010/01/sat/. [Accessed: 10- Jul- 2017].