Original Post
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
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.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more