?/TD> |
Microsoft DirectX 9.0 |
This section describes Microsoft?DirectX?graphics features that are new in DirectX 9.0. See what's new in all of DirectX at What's New in DirectX 9.0.
The programming guide has been reorganized into the following sections to help you find a topic.
Added a new page about DirectX 9.0 style vertex declarations. See Vertex Declaration.
Textures section - Added automatic generation of mipmaps. See Automatic Generation of Mipmaps.
Vertex and pixel shaders are no longer referred to with handles; they are objects. There is also a new section detailing the decoupling of vertex shaders and vertex declarations. See Component Object Model (COM) interfaces IDirect3DVertexShader9 and IDirect3DPixelShader9.
Shaders and vertex stream declarations are no longer bound together at creation time. Vertex stream declarations are now expressed as an array of D3DVERTEXELEMENT9 elements. For more information, see Mapping Vertex Declarations and IDirect3DDevice9::SetFVF.
Version 2 vertex shaders (vs_2_0) adds a limited form of flow control (loop...endloop, if...else...endif, and subroutines). Other features include more registers, constant setting methods (IDirect3DDevice9::SetVertexShaderConstantB, IDirect3DDevice9::SetVertexShaderConstantF, and IDirect3DDevice9::SetVertexShaderConstantI), new macro-ops for power, cross product, sign, absolute value, and linear interpolation. See Vertex Shader 2_0.
Version 2 pixel shaders (ps_2_0) decoupled texture data and sampling by creating sampler registers in addition to the texture registers. Increased the instruction count and number of registers. Added float data types. Texture address and arithmetic instructions can now be intermixed. Eliminated all modifiers except negate. New macros and instructions include sincos (sine and cosine), normalization, cross product, power, linear interpolation, projected texture load, and biased level of detail (LOD) texture load. See Pixel Shader 2_0.
Software shaders have been implemented to facilitate shader development without hardware support. The following software versions have been added: vs_2_sw, vs_3_sw, ps_2_sw, ps_3_sw.
Extended shader versions take existing shader versions and extend their functionality if certain caps are set by the hardware. Extended functionality includes features like dynamic flow control, static flow control nesting, gradient instructions, and arbitrary swizzle. For more information, see Vertex Shader 2_0 Extended and Pixel Shader 2_0 Extended.
Version 3 shaders further enhance the functionality of the extended shader versions without requiring caps to be set. Vertex shaders also add new support for vertex texturing, and control over how often vertex shader registers can be set during render calls. For more information, see Vertex Shader 3_0 and Pixel Shader 3_0.
Many new pages have been added to the reference section including:
Effects framework. A new interface, ID3DXEffectCompiler, allows the user to compile an effect from a function or from a vertex shader. The function can be written using the High-Level Shader Language.
Other new features include the following: