NVIDIA GeForce 6800 Ultra: The Next Step Forwardby Derek Wilson on April 14, 2004 8:42 AM EST
- Posted in
What's new in DX 9.0c
This year the latest in the DirectX API is getting a bit of a face lift. The new feature in DirectX 9.0c is the inclusion of Pixel Shader and Vertex Shader 3.0. Rather than calling this DirectX 9.1, Microsoft opted to go for a more "incremental" looking update. This can end up being a little misleading because whereas the 'a' and 'b' revisions mostly extended and tweaked functionality, the 'c' revision adds abilities that are absent from its predecessors.
Pixel Shader 3.0 (PS3.0) allows shader programs of over 65,000 lines and includes dynamic flow control (branching). This revision also requires that compliant hardware offer 4 Multiple Render Targets (MRT's allow shaders to draw to more than one location in memory at a time), full 32-bit floating point precision, shader antialiasing, and a total of ten texture coordinate inputs per pixel.
The main advantage here is the ability for developers to write longer, more complex, shader programs that run more efficiently. The flow control will give developers the freedom to write more intuitive code without sacrificing efficiency. Branching allows a shader program the expanded ability to make decisions based on its current state and inputs. Rather than having to run multiple shaders that do different things on different groups of pixels, developers can have a single shader handle an entire object and take care of all its shading needs. Our example of choice will be shading a tree: one shader can handle rendering the dynamics of each leaf, smooth new branches near the top, rugged old bark on the trunk, and dirty roots protruding from the soil.
Vertex Shader 3.0 extends its flow control ability by adding if/then/else statements and including the ability to call subroutines in shader programs. The instruction limit on VS3.0 is also extended to over 65000. Vertex textures are also supported, allowing more dynamic manipulation of vertices. This will get even more exciting when we make our way into the next DirectX revision which will allow for dynamic creation of vertices (think very cool particle systems and hardware morphing of geometry).
One of the coolest things that VS3.0 offers is something called instancing. This functionality can remove a lot of the overhead created by including multiple objects based on the same 3d model (these objects are called instances). Currently, the geometry for every model in the scene needs to be setup and sent to the GPU for rendering, but in the future developers can create as many instances of one model as they want from one vertex stream. These instances can be translated and manipulated by the vertex shader in order to add "individuality" to each instance of the model. To continue with our previous example, a developer can create a whole forest of trees from the vertex stream of one model. This takes pressure off of the CPU and the bus (less data is processed and sent to the GPU).
Now that we've seen what developers are looking at with DirectX 9.0c, let's take a look at how NVIDIA plans to bring these features to the world.