Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79
oZone3D.Net Tutorials - NVIDIA G80: OpenGL Programming - New OpenGL Extensions - GLSL - Geometry shader




GeeXLab
Current version: 0.45.1
>GeeXLab homepage

FurMark
Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage


Blogs
>JeGX's HackLab

Geeks3D's Articles
>GPU Memory Speed Demystified

>Multi-Threading Programming Resources

>GeForce and Radeon OpenCL Overview

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

TessMark
Current version: 0.3.0
>TessMark homepage

ShaderToyMark
Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Download
>Libraries and Plugins
>Demos
>Online Help - Reference Guide
>Codes Samples
 


NVIDIA nZone.com NVIDIA Developer Blog
NVIDIA G80: OpenGL Programming

By: Christophe [Groove] Riccio - www.g-truc.net
Initial Version: November 12, 2006
Edited and Translated by the oZone3D Team
Last Update: March 25, 2007


[ Index ]

Introduction | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

�Next Page



8 - GLSL

8.1 - Geometry shader

An important number of the previously described extensions have implications at the GLSL level but also with the API that allows the interaction between the CPU and the GPU. The GL_EXT_gpu_shader4 extension handles these changes and GL_EXT_geometry_shader4 is in charge of integrating into OpenGL the geometry shader notion which, just for recalling, should be called "primitive shader" according to the OpenGL terminology. The geometry shaders bring new geometric shapes to describe the neighborhood of each primitive, which allows for example to apply the triangle subdivision [1]. Contrarily to Direct3D 10, the syntax of the geometry shaders is not snaky. In fact, it is the same than the one that has been used till now for the vertex shaders and the fragment shaders with this famous unification function, which means that all the functionalities are available for all the shaders.

Besides, there are only two functions available on the geometry shader: EmitVertex() and EndPrimitive() whose working is easily understandable when referring to the immediate mode of OpenGL. EmitVertex() is then equivalent to glVertex*() and EndPrimitive() is equivalent to glEnd(). glBegin() is implicit, when we go in a geometry shader, we may consider that a call of this type is done, also after each call to EndPrimitive(). Data that have been given to each newly created vertex correspond to the values given to the varying variables.



8.2 - Language update

At the GLSL level, we have to deal with two new functions, round and truncate, as well as a revaluation of integers. They are now coded on 32 bits, the bit-to-bit operators are supported, the abs, sign, min, max and clamp functions fully support integers and new unsigned integer types are available: unsigned int, uvec2, uvec3 et uvec4 and a big number of new samplers for texture representation with integers. Regarding functions for the textures, it is a real bleeding, like the one for the "texture fetch", to get the dimensions, access to the texture array, without take into account two new notions: the first is the gradiant (partial derivateon each component) and the second is the offset, that allows to offset the texture coordinates by a sum



Editor's Notes
  • [1]: Triangles subdivision is only one of the numerous applications of the geometry shaders. In 2001-2002, ATI had integrated into radeon the Trueform technology which can be seen as a limited and fixed version of the G80's geometry shaders. For more information about Trueform see the following article: ATI TRUFORM Technology - Powering the next generation Radeon.




[ Index ]

Introduction | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

�Next Page





GeeXLab demos


GLSL - Mesh exploder


PhysX 3 cloth demo


Normal visualizer with GS


Compute Shaders test on Radeon


Raymarching in GLSL



Misc
>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0033349990844727 seconds.