skip to main content
10.1145/2492045.2492060acmconferencesArticle/Chapter ViewAbstractPublication PageshpgConference Proceedingsconference-collections
research-article

Megakernels considered harmful: wavefront path tracing on GPUs

Published:19 July 2013Publication History

ABSTRACT

When programming for GPUs, simply porting a large CPU program into an equally large GPU kernel is generally not a good approach. Due to SIMT execution model on GPUs, divergence in control flow carries substantial performance penalties, as does high register us-age that lessens the latency-hiding capability that is essential for the high-latency, high-bandwidth memory system of a GPU. In this paper, we implement a path tracer on a GPU using a wavefront formulation, avoiding these pitfalls that can be especially prominent when using materials that are expensive to evaluate. We compare our performance against the traditional megakernel approach, and demonstrate that the wavefront formulation is much better suited for real-world use cases where multiple complex materials are present in the scene.

References

  1. Aila, T., and Laine, S. 2009. Understanding the efficiency of ray traversal on GPUs. In Proc. High Performance Graphics, 145--149. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Aila, T., Laine, S., and Karras, T. 2012. Understanding the efficiency of ray traversal on GPUs -- Kepler and Fermi addendum. Tech. Rep. NVR-2012-02, NVIDIA.Google ScholarGoogle Scholar
  3. Ernst, M., and Woop, S., 2011. Embree: Photo-realistic ray tracing kernels. White paper, Intel.Google ScholarGoogle Scholar
  4. Hoberock, J., Lu, V., Jia, Y., and Hart, J. C. 2009. Stream compaction for deferred shading. In Proc. High Performance Graphics, 173--180. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Jakob, W., 2010. Mitsuba renderer. http://www.mitsuba-renderer.org.Google ScholarGoogle Scholar
  6. Joe, S., and Kuo, F. Y. 2008. Constructing Sobol sequences with better two-dimensional projections. SIAM J. Sci. Comput. 30, 2635--2654. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Kajiya, J. T. 1986. The rendering equation. In Proc. ACM SIGGRAPH 86, 143--150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kelemen, C., Szirmay-Kalos, L., Antal, G., and Csonka, F. 2002. A simple and robust mutation strategy for the Metropolis light transport algorithm. Comput. Graph. Forum 21, 3, 531--540.Google ScholarGoogle ScholarCross RefCross Ref
  9. Kniep, S., Häring, S., and Magnor, M. 2009. Efficient and accurate rendering of complex light sources. Comput. Graph. Forum 28, 4, 1073--1081. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Lafortune, E. P., and Willems, Y. D. 1993. Bi-directional path tracing. In Proc. Compugraphics, 145--153.Google ScholarGoogle Scholar
  11. Novák, J., Havran, V., and Daschbacher, C. 2010. Path regeneration for interactive path tracing. In Eurographics 2007, short papers, 61--64.Google ScholarGoogle Scholar
  12. Parker, S. G., Bigler, J., Dietrich, A., Friedrich, H., Hoberock, J., Luebke, D., McAllister, D., McGuire, M., Morley, K., Robison, A., and Stich, M. 2010. OptiX: A general purpose ray tracing engine. ACM Trans. Graph. 29, 4, 66:1--66:13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Pharr, M., and Humphreys, G. 2010. Physically Based Rendering, 2nd ed. Morgan Kaufmann. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Pharr, M., and Mark, W. 2012. ispc: A SPMD compiler for high-performance CPU programming. In Proc. InPar 2012, 1--13.Google ScholarGoogle Scholar
  15. Purcell, T. J., Buck, I., Mark, W. R., and Hanrahan, P. 2002. Ray tracing on programmable graphics hardware. ACM Trans. Graph. 21, 3, 703--712. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Raab, M., Seibert, D., and Keller, A. 2008. Unbiased global illumination with participating media. In Monte Carlo and Quasi-Monte Carlo Methods 2006. 591--605.Google ScholarGoogle Scholar
  17. Robison, A. 2009. Hot3D talk: Scheduling in NVIRT. HPG '09, http://www.highperformancegraphics.org/previous/www_2009/presentations/nvidia-rt.pdf.Google ScholarGoogle Scholar
  18. Stich, M., Friedrich, H., and Dietrich, A. 2009. Spatial splits in bounding volume hierarchies. In Proc. High Performance Graphics, 7--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. van Antwerpen, D. 2011. Improving SIMD efficiency for parallel Monte Carlo light transport on the GPU. In Proc. High Performance Graphics, 41--50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Veach, E., and Guibas, L. 1994. Bidirectional estimators for light transport. In Proc. Eurographics Rendering Workshop, 147--162.Google ScholarGoogle Scholar
  21. Veach, E., and Guibas, L. J. 1995. Optimally combining sampling techniques for Monte Carlo rendering. In Proc. ACM SIGGRAPH 95, 419--428. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Veach, E., and Guibas, L. J. 1997. Metropolis light transport. In Proc. ACM SIGGRAPH 97, 65--76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Wald, I. 2011. Active thread compaction for GPU path tracing. In Proc. High Performance Graphics, 51--58. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Megakernels considered harmful: wavefront path tracing on GPUs

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            HPG '13: Proceedings of the 5th High-Performance Graphics Conference
            July 2013
            149 pages
            ISBN:9781450321358
            DOI:10.1145/2492045

            Copyright © 2013 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 19 July 2013

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            HPG '13 Paper Acceptance Rate15of44submissions,34%Overall Acceptance Rate15of44submissions,34%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader