Background. Global illumination is not trivial to compute in real-time computer graphics. One approximate solution is to distribute virtual light sources from a primary light, to then apply direct light calculations to said virtual lights. This can effectively estimate two-bounce illumination. To mitigate artifacts, virtual lights make use of a spherical shape and utilize spherical harmonics to allow for efficient light integration. These indirect light sources are referred to as "harmonics virtual lights" (HVLs). Objectives. The objectives of this thesis are to analyze the data structures, calculations and performance of an HVL implementation in different 3D scenes. Methods. HVLs are implemented using the Vulkan API. Experiments are then performed to evaluate and optimize execution times. Furthermore, different measures are taken to ensure correctness and minimize errors wherever possible. Results. The GPU pass responsible for gathering indirect light contributions from HVLs turned into a heavy bottleneck. A number of different optimization techniques were applied to said pass and analyzed. Seven techniques were found to have a positive effect on performance, each with varying degrees of impact on timings. No optimization compromised on input parameters, visual results or mathematical correctness. Additionally, three techniques were instead worsening performance of the implementation, despite having initial motivations for possible improvements. Conclusions. All optimization techniques with positive effects working in conjunction led to a total speedup of 46.9x in a specific use case of our implementation. There is room for further potential improvements, and a number of different techniques for future work are explained. The final source code for the implementation can be viewed in a public GitHub repository.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:bth-24988 |
Date | January 2023 |
Creators | Hultsborn, Simon |
Publisher | Blekinge Tekniska Högskola, Institutionen för datavetenskap |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0022 seconds