PDA

View Full Version : clearly, i'm a noob



homer_simpson0
02-16-2009, 10:10 AM
what is Vertex shader?
what is Pixel shader?
what is GLSL?
what is CG shader?
what is gl extention?

and what can i use them for?

ZbuffeR
02-16-2009, 10:24 AM
pixel shader : a small piece of code that is executed for each pixel by the 3D hardware, to "shade" it (in fact can do a wide range of different computations)

vertex shader : a small piece of code that is executed for each vertex by the 3D hardware, most of the time not to shade it, but to move it procedurally, compute normals, etc

Historically an assembler-like syntax was used to code these programs, currently it is C-like syntax which is used.

GLSL : OpenGL Shading Language, the language used to code the 2 above programs.
Cg : C for Graphics, another high level language for the same purpose, pushed by Nvidia.

GL extension : the way an hardware vendor can expose its new features to GL programmers very early. Some extensions are common to multiple vendors. The full story : http://www.opengl.org/wiki/OpenGL_extensions

Have a read around the wiki and these tutorials :
http://www.opengl.org/sdk/docs/tutorials/

scratt
02-16-2009, 10:30 AM
Vertex, Fragment (Pixel) and also *new* Geometry shaders are all components of the languages GLSL or CG. Each is a small program which replaces part of the fixed function pipeline and makes it user programmable.

gl Extensions are improvements / augmentations to the OpenGL standard.

Typically we use Extensions to access shader functionality.

Check out the LightHouse 3D tutorials for a good heads up on OpenGL and GLSL.

homer_simpson0
02-16-2009, 10:30 AM
thanx for the quick response. i'll look into the tutorials