10.11.2014 Views

Master's Thesis - Studierstube Augmented Reality Project - Graz ...

Master's Thesis - Studierstube Augmented Reality Project - Graz ...

Master's Thesis - Studierstube Augmented Reality Project - Graz ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.2 Advanced Graphics Processing<br />

programming features available since Shader Model 3.0 1 and the increased processing<br />

speed have been used. This is because of the desired compatibility to currently available<br />

systems in clinical routine. The next section outlines only the basic concepts of<br />

shader programming since Shader Model 3.0.<br />

Currently three main shader languages exist:<br />

• Cg which stands for ”C for graphics” and is developed by Nvidia,<br />

• GLSL stands for ”Graphics Library Shader Language” and is provided for<br />

OpenGL,<br />

• HLSL stands for ”High Level Shader Language” and applies to DirectX 2 based<br />

applications.<br />

They are all C-like programming languages and are of the same value. The implementation<br />

in chapter 5 concentrates on GLSL. However the following techniques can be<br />

implemented with all other languages as well.<br />

In general two types of shader programs can be distinguished. Firstly a so-called<br />

vertex program executed by the vertex processing unit is at least able to define a new<br />

position for each given vertex position processed for each frame with any parameters as<br />

input. Secondly a so-called fragment program processes all pixel candidates which were<br />

produced between the vertices by a rasterization unit. The output of a fragment shader<br />

will always be a RGBA color value. The output of such shader does not necessarily need<br />

to be rendered to a display device. Instead it can be written into a buffer or texture<br />

for further use. Furthermore the implicit float arithmetic of graphic microprocessors<br />

allows calculations for general purposes.<br />

A benefit - in contrast to CPU processing<br />

- will be achieved if graphics operations are performed on multiple input data and<br />

vectors data types. Since graphics hardware matches these constraints it is also called<br />

a Single Instruction Multiple Data (SIMD) Processor. A perfect example for such a<br />

SIMD operation will be the update mechanisms on millions of particles moving through<br />

a flow velocity field as described in section 2.1.1.2.<br />

1 Shader Model 3.0 (SM 3.0) was developed by Nvidia with the GeForce 6x-series in 2004.<br />

2 http://www.gamesforwindows.com/en-US/AboutGFW/Pages/DirectX10.aspx<br />

31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!