Font Size: a A A

Real-time Rendering On GPU

Posted on:2008-03-22Degree:MasterType:Thesis
Country:ChinaCandidate:Y X LiuFull Text:PDF
GTID:2178360215990589Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
GPU (Graphics Processing Unit) is equipped with independent processor, independent RAM and independent programming language, which makes GPU programmable like a CPU (Central Processing Unit). Moreover, GPU outperforms CPU in terms of floating-point performance and throughput. As a consequence, GPU is superior to CPU in the area of real-time 3D rendering.Graphics pipeline is the most fundamental and important technical framework in computer graphics. Though GPU has the capability to perform graphics computing at a very high speed, those algorithms implemented on traditional CPU-based graphics pipeline can not be directly transferred to GPU-based graphics pipeline. This is because GPU is based on stream-like hardware architecture and parallel programming model. Therefore, the serial processing model of traditional graphics pipeline needs to adapt to parallel processing model. Only by doing so can GPU-based graphics pipeline fully exert its strengths.This thesis makes a comparative study between the CPU-based graphics pipeline and the GPU-based graphics pipeline.First, the principle in traditional CPU-based graphics pipeline (including object modeling, geometry transformation, lighting model, rasterization, texture mapping and acceleration algorithm) are reviewed. Second, focus is turned to the vertex processor and the fragment shader of GPU-based graphics pipeline. Vertex transformation algorithms that implement animation and environment mapping are described. Some lighting effects, including distance attenuation and spotlight effects, are achieved through our fragment shader algorithms. Some programming tips that can improve graphics program performance are also summarized.Next, a vertex transform algorithm is presented based on the GPU pipeline using OpenGL and CG, which is used to simulate 3D water wave with a single wave source. According to this algorithm, sine function is adopted as the base wave function when constructing the water wave grid, the surge factor of the wave is passed as a uniform argument, and the vertex processor computes the displacements of the vertices on the wave grid for implementing the surge effects.Finally, a fragment shading algorithm is advised based on the GPU pipeline using OpenGL and CG, which computes anisotropic lighting provided there is only one light source in the scene. By this algorithm, a texture is adopted as a look-up table for the correct anisotropic lighting values by storing the pre-calculated diffuse values in the texture's RGB components and specular values in its alpha component. This style of lighting is very useful for rendering surfaces like brushed steel where the surface is composed of micro facets or microscopic scratches that tend to lay parallel or run in the same direction.
Keywords/Search Tags:3D Real-Time Rendering, Graphics Pipeline, GPU, Water Wave Simulation, Anisotropic Lighting
PDF Full Text Request
Related items