使用預先計算材質之GLSL光線追蹤優化

No Thumbnail Available

Date

2014

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

隨著GPU計算能力越來越強大,GPGPU的使用越來越成熟且廣泛,而除了CUDA和OpenCL之外 ,GLSL也是一種GPGPU的使用,光線追蹤演算法很適合實作在GLSL上做平行化,因為就GLSL來說,fragment shader是對每個像素做運算,所以可以藉由實作在GLSL來達到平行化的效果。因此,除了演算法本身的優化,搭配使用GLSL來對光線追蹤做平行化,整體效能會有所提升,逐漸改善光線追蹤耗時的問題。 在這篇論文中,我使用GPGPU的幫助,將光線追蹤實做在GLSL上以此達到平行化的效果。在過程中,就GLSL光線追蹤方面探討不同的資料處理方法,進而從中使用較適合且效能較好的方式來處理,並且對光線追蹤的演算法進行優化,提升整體的效能。最後,在同個場景和效果之下,我分析了GLSL光線追蹤與GLSL傳統光柵化之間效能的比較,整理出目前光線追蹤的效能較差的問題點,並且利用實驗的結果歸納出光線追蹤在使用GPGPU的發展趨勢,未來在GPU的發展下,光線追蹤和傳統光柵化的效能差距是有拉近的可能。
With the growth of GPU computing capabilities, GPGPU becomes more and more mature and far-ranging. In addition to CUDA and OpenCL, GLSL is a kind of GPGPU. Ray Tracing algorithm is suitable for implementing on GLSL. For GLSL, the fragment shader does computation in every pixel, so it can reach the goal of parallelization by implementing on GLSL. Therefore, in addition to the normalization of algorithm, using GLSL to parallelize Ray Tracing can enhance the performance. In this paper, I use GPGPU, implementing Ray Tracing on GLSL to achieve the effect of parallelization. In the process, I discuss different methods of data processing in GLSL Ray Tracing and select the most suitable and most efficient method to use. Then, I extend the Ray Tracing algorithm to enhance the overall performance. Finally, I analyze the performance between GLSL Ray Tracing and GLSL Traditional Rasterization with the same scene and effect, sorting out the problem about thepoor performance of Ray Tracing. According to the results of experiment, I summarize the trends of Ray Tracing in the use of GPGPU. With the improvement of GPU, it is possible to narrow the performance gap between GLSL Ray Tracing and GLSL Traditional Rasterization.

Description

Keywords

光線追蹤, 傳統光柵化, 效能, GPGPU, GLSL, Ray Tracing, Traditional Rasterization, performance, GPGPU, GLSL

Citation

Collections

Endorsement

Review

Supplemented By

Referenced By