Skip to main content
GameDev.net gamedev.net
🔒 Locked

Pixel Shaders

Started by jonbell Jan 4, 2003 at 10:39 AM 4 replies 250+ views
Original Post
jonbell
jonbell
I keep reading a lot about pixel shading but i don''t know anything about it. Can someone just give me a brief overview of what it is or point me in the direction of a good article. Ta
mittens
mittens
GameDev had a series of shader articles a while back, here are the links to all five articles:

http://www.gamedev.net/reference/articles/article1496.asp
http://www.gamedev.net/reference/articles/article1807.asp
http://www.gamedev.net/reference/articles/article1820.asp
http://www.gamedev.net/reference/articles/article1837.asp
http://www.gamedev.net/reference/articles/article1849.asp

There ya go, and have fun playing with shaders, they seem to be a lot of fun, though I haven''t had the time to turn my theory knowledge of them into any implementations.

Trent Polack
trent.codershq.com
trent@codershq.com
Author of Focus on 3D Terrain Programming
jonbell
jonbell
pixel / vertex shading is available in OpenGL right?
Hairybudda
Hairybudda
quote:

Ok, shaders are microsofts convention for naming fragment and vertex programs.

A vertex program(or shader), if you''re familiar with the OpenGL rendering pipeline, is a stage that you can control before the primitive assembly stage on the graphics card(IIRC). Basically, you can, on the card, do complex tranformations to individual vertices that would normally take insane amounts of CPU time up. One catch is you cannot create nor destroy a vertex on the GPU. Thats all has to be done CPU level.

Now, a fragment shader ( or pixel shader ) is more or less the same thing, only its done before the final rasterisation stages of each fragment(or pixel if you wish). This means you can do computationally expensive lighting and colouring effects on the GPU, that would also absulutely murder your CPU. This means you can do perfect per pixel lighting, high quality effects etc...

Now you can feed directly to a vertex shader from the cpu, and you can feed directly to a fragment shader directly from the CPU, but you can also feed to a fragment shader from a vertex shader, meaning you can define your own custom Transformation and Lighting pipeline.

A few ways of exploiting these shaders in OGL would be to use the ARB_vertex_program & ARB_fragment_program extensions, although i wouldn''t reccommend this without a reasonable level of experience. Another way would be to go through some high level shader language(i.e. Gl 2.0 Shader language nVidia Cg ). I would reccommend Cg.

Now, a normal map is a texture that you can feed to a fragment program, that in itself isn''t actually a texture. Its an array of normals, encoded in the texture, so that they can accurately be passed into a shader.


http://www.gamedev.net/community/forums/topic.asp?topic_id=131405
Might help you. I love quoting myself
st0ned
iNsaNEiVaN
iNsaNEiVaN
If I had a recent video card, i would love to try pixel/vertex shaders. My Voodoo3 doesnt even have a stencil buffer. :-(

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.