High Level Shader Language

High Level Shader Language

The High Level Shader Language or High Level Shading Language (HLSL) is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API. It is analogous to the GLSL shading language used with the OpenGL standard. It is very similar to the NVIDIA Cg shading language, as it was developed alongside it. [ [http://www.fusionindustries.com/default.asp?page=cg-hlsl-faq Fusion Industries :: Cg and HLSL FAQ :: ] ]

HLSL programs come in three forms, vertex shaders, geometry shaders, and pixel (or fragment) shaders. A vertex shader is executed for each vertex that is submitted by the application, and is primarily responsible for transforming the vertex from object space to view space, generating texture coordinates, and calculating lighting coefficients such as the vertex's tangent, binormal and normal vectors. When a group of vertices (normally 3, to form a triangle) come through the vertex shader, their output position is interpolated to form pixels within its area, this process is known as rasterisation. Each of these pixels comes through the pixel shader, whereby the resultant screen colour is calculated.

Optionally, an application using a Direct3D10 interface and Direct3D10 hardware may also specify a geometry shader. This shader takes as its input the three vertices of a triangle and uses this data to generate (or tessellate) additional triangles, which are each then sent to the rasterizer.

hader model comparison

Pixel shader comparison

*PS 2.0 = DirectX 9.0 original Shader Model 2 specification.
*PS 2.0a = NVIDIA GeForce FX-optimized model.
*PS 2.0b = ATI Radeon X700, X800, X850 shader model, DirectX 9.0b.
*PS 3.0 = Shader Model 3.
*PS 4.0 = Shader Model 4.

"32 + 64" for "Executed Instructions" means "32 texture instructions and 64 arithmetic instructions."

Vertex shader comparison

*VS 2.0 = DirectX 9.0 original Shader Model specification.
*VS 2.0a = NVIDIA GeForce FX-optimized model.
*VS 3.0 = Shader Model 3.
*VS 4.0 = Shader Model 4.

External links

* [http://www.riemers.net/Tutorials/DirectX/Csharp3/index.php Riemer's HLSL Introduction & Tutorial (includes sample code)]
* [http://www.coniserver.net/wiki/index.php/Simple_HLSL_Shader_Tutorial Simple HLSL Shader Tutorial]
* [http://www.neatware.com/lbstudio/web/hlsl.html HLSL Introduction]

Footnotes


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • High Level Shader Language — or HLSL («lenguaje de sombreado de alto nivel») es un lenguaje de sombreado desarrollado por Microsoft para su uso con la interfaz de programación de aplicaciones Direct3D. Es análogo al lenguaje de sombreado GLSL usado con el estándar OpenGL.… …   Wikipedia Español

  • High Level Shader Language — (HLSL) est le langage de programmation des pipelines des cartes graphiques 3D intégré à l API Direct3D. Il est compatible avec le GLSL. Portail de l’imagerie numérique …   Wikipédia en Français

  • High Level Shading Language — HLSL (High Level Shading Language) bezeichnet die DirectX Komponente, die die Programmierung von Shader Bausteinen ermöglicht. Inhaltsverzeichnis 1 Shader Sprachen 2 Sprach Elemente 2.1 Globale Shader Parameter …   Deutsch Wikipedia

  • Shader Language — Shader Un shader (anglais, du verbe to shade : ombrager ou estomper, nuancer) est un programme[Quoi ?] utilisé en image de synthèse pour paramétrer une partie du processus de rendu réalisé par une carte graphique ou un moteur de rendu… …   Wikipédia en Français

  • Shader language — Shader Un shader (anglais, du verbe to shade : ombrager ou estomper, nuancer) est un programme[Quoi ?] utilisé en image de synthèse pour paramétrer une partie du processus de rendu réalisé par une carte graphique ou un moteur de rendu… …   Wikipédia en Français

  • Shader Model — Shader Un shader (anglais, du verbe to shade : ombrager ou estomper, nuancer) est un programme[Quoi ?] utilisé en image de synthèse pour paramétrer une partie du processus de rendu réalisé par une carte graphique ou un moteur de rendu… …   Wikipédia en Français

  • Shader — Un shader (le mot est issu du verbe anglais to shade pris dans le sens de « nuancer ») est une suite d instructions donnée à un ordinateur, utilisé en image de synthèse, pour paramétrer une partie du processus de rendu réalisé par une… …   Wikipédia en Français

  • High dynamic range rendering — A comparison of the standard fixed aperture rendering (left) with the HDR rendering (right) in the video game Half Life 2: Lost Coast In 3D computer graphics, high dynamic range rendering (HDRR or HDR rendering), also known as high dynamic range… …   Wikipedia

  • Shader — A shader in the field of computer graphics is a set of software instructions, which is used by the graphic resources primarily to perform rendering effects. Shaders are used to allow a 3D application designer to program the graphics processing… …   Wikipedia

  • High and low level — High level and low level are terms used in classifying levels of description and goals in many fields where systems could be described from different perspectives. A high level description is one that describes top level goals, overall systemic… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”