GPU Programming

GPU Programming


Project Leaders Project Participants
  • Dipl.-Ing. Hans-Friedrich Pabst
  • Prof. Dr. Bernd Fröhlich
  • Anne Keller
  • Robert Lenhardt
  • Andre Schollmeyer
  • Christoph Sladeczek

Abstract

"The graphics processor (GPU) on today's commodity video cards has evolved into an extremely powerful and flexible processor. The latest graphics architectures provide tremendous memory bandwidth and computational horsepower, with fully programmable vertex and pixel processing units that support vector operations up to full IEEE floating point precision. High level languages have emerged for graphics hardware, making this computational power accessible. Architecturally, GPUs are highly parallel streaming processors optimized for vector operations, with both MIMD (vertex) and SIMD (pixel) pipelines. Not surprisingly, these processors are capable of general-purpose computation beyond the graphics applications for which they were designed. Researchers have found that exploiting the GPU can accelerate some problems by over an order of magnitude over the CPU" (SIGGRAPH 2005 GPGPU course).

The aim of the project "GPU-Programming" was to become familiar with the programmability of commodity GPUs. In this context several shading languages with several graphic hardware were tested. After getting a small overview about what is possible to realize on a programmable graphic processor, we decided to use it for general purpose programming. We port an interactive oriented particle system to the GPU, as described by [2] for the CPU, combined with several point based rendering algorithms to get realistic shading of our models, as described in [3].

Results

libglsl
Using a GPU as processing unit for complex problems requires a well organized framework. We implemented a C++-library wrapped around several OpenGL 2.0 functionality in order to create a type safe basis for further framework.
- shader objects
- buffer objects
- pbuffer

Shading Effects
In order to be become aware of the possibilities of today's GPU some shading effects were implemented. Programmable GPU's especially facilitate non-realistic shading effects.

High-Quality Point-Based Rendering

Rendering point clouds to form a smooth, shaded 3D object that does not show any holes in the surface was our aim. Creating triangle meshes from the point cloud is a calculation intense task, thus we want to use our initial points as rendering primitives. This is also justified by the fact that we can exploit the parallelism of programmable Vertex and Fragment Shaders and therefore benefit from the high performance of today's graphics hardware. We implemented a point-based rendering approach using elliptical, oriented and opaque splats with dynamic sizes.

Global Interactive Particle System

Using our framework we implemented an interactive oriented particle system. On basis of a well balanced CPU/GPU interaction we use a new approach to solve approximitly the nearest neighbor problem (jittered block hashing). This approach is grid based and distributes the approximation error over the time.

Conclusion

Finally, we achieved most of our goals. Unfortunately, despite high-level shading languages programming GPU's in order to to perform general purpose tasks is not as simple as it appears. Especially, the OpenGL Shading Language (GLSL) emerges as non-optimal solution for shaderprograms near the hardware limit. Upcoming graphic hardware and compilers will solve these problems.

Documents and References