Shader

From GDWiki

(Redirected from Shaders)
Jump to: navigation, search

In constrast to the Fixed Function Pipeline, shaders allows one to program the vertex transformation, geometry assembly, and pixel output of a graphics card. Shaders are most commonly used to achieve various rendering effects, such as motion blur and High Dynamic Range Lightning. The use of shaders to utilize the programmable pipeline has mostly superseded the use of the fixed function pipeline in modern games.

For more information, see Wikipedia's Entry on Shaders.

Contents

[edit] Introduction

In general, a shader is a set of instructions that is passed to the GPU. Shader support was added in OpenGL version 1.5, and DirectX 8.0.

[edit] OpenGL Shaders

OpenGL has support for shaders since OpenGL 1.5, which can be accessed through the use of OpenGL:Extensions for OpenGL versions lower than 2.0. Shaders are specified in GLSL.

[edit] DirectX Shaders

DirectX has support for shaders since DirectX8.

[edit] Cross Rendering API Shaders

Cg or C for Graphics is a high-level shading language developed by Nvidia in close collaboration with Microsoft for programming vertex and pixel shaders. It is very similar to Microsoft's HLSL.

For more information, see Wikipedia's article on CG

[edit] GPGPU

It is possible to use the programmable pipeline to perform rapid calculations on sets of data. This technique is commonly known as General-purpose computing on graphics processing units, or GPGPU. In this techniqiue, textures are used as input and output arrays, and the pixel shader is used as a computational kernel for performing massively parallel calculations on the data. Using this technique, it is possible to calculate fluid flow, particle collisions, and other computationally intensive tasks on the GPU instead of the CPU

Personal tools