Product Info | User Reviews | Article Images(14) | Image Gallery | Comments | Forum Thread
2.0 Vertex/Pixel Shaders
The Vertex shaders
The CineFX engine that the GeForce FX is based on supports up to 65,536 instructions for vertex processing, up from 128. This allows developers to write longer vertex programs to create objects that are more complex. Another area where the CineFX architecture excels is in character animation.
With DirectX 8 accelerators, if an object used vertices that could be affected by multiple bones, a vertex shader would have to be written for each one. With DirectX 9, one shader can be written to perform the same task, easing development for the programmer.
Meet Mr. Ogre
We think the Ogre can take Wolfman!
But with RADEON 9700 the object must still be broken up and drawn separately. GeForce FX is unique in that it can branch the shader on a per vertex basis, and it is not required to break up the object. This improves performance and makes things easier for the developer.
Another new addition brought with the DirectX 9 2.0 vertex shaders is flow control. This gives the developer the ability to use conditional branching as well as subroutines to perform mathematical calculations as well as providing early termination of the vertex program if certain conditions are met. If additional calculations aren’t necessary to improve the visual quality, the program can be terminated and can start working on the next vertex (or load the next vertex program) instead of going through the remainder of the program (a la a DirectX 8 vertex shading engine).
DirectX 8 pixel shaders were limited to very simple pixel shader effects. This was because DirectX 8 pixel shaders only supported a limited set of instructions that were focused on various texture related operations. The 2.0 pixel shaders in DirectX 9 have all of the commands available in 2.0 vertex shaders plus a few instructions necessary for pixel processing.
Another advantage with 2.0 pixel shaders is that programs can be larger, allowing developers to create a wife variety of effects. Multiple textures can also be combined in a single, one pass shader for greater efficiency. In comparison, DirectX 8 support eight instructions.
The key point to remember with the new 2.0 pixel and vertex shaders is that they are incredibly more powerful than the 1.4 shaders available in DirectX 8. They are easier to write and more flexible, making life easier for developers. DirectX 9 shaders will also provide increased performance. Many effects that would have required multiple passes in DirectX 8 can be performed in a single pass by DirectX 9 shaders. If you recall the Wolfman demo used for the GeForce4 launch, Mr. Wolf’s fur required eight passes for every pixel. With DirectX 9, GeForce FX can render Wolfman’s fur in a single pass.