Archived

This topic is now archived and is closed to further replies.

kill

Shaders in DX8

Recommended Posts

kill    146
Everyone is talking about the new shaders feature in DX8, but I really don''t understand how everything will work. Basically shaders is a low level way of talking to the 3D card. But doesn''t that mean that DirectX will become hardware dependent? Also does this mean that the usual way of rendering primitives, defining lights, textures, etc. will not be included in DX8 functionality? If someone could clarify this, it''d be great.

Share this post


Link to post
Share on other sites
acw83    174
I know that Direct X uses the COM structure, so anything that you have written for DX7 should still work on DX8. As to how different the new api will be I have no idea.

Share this post


Link to post
Share on other sites
mhkrause    122
More info on vertex shaders and pixel shaders are in the meltdown presentations, at http://www.microsoft.com/hwdev/meltdown .

Basically, you create a card-independent shader using a shader assembly language. This is translated into something the card can handle by the driver (or in the case of vertex shaders on the software TnL pipeline, PIII and 3DNow! optimized native code.) In most cases, this should probably be a fairly thin translation. Most cards will probably support the D3D syntax natively (most already support the D3D flexible vertex format natively, why not this?)

The normal way of lighting and transforming vertices can still be used, and will probably be provided as a "standard" shader.

The normal way of doing textures will definetly be around. You can emulate a vertex shader in software with good framerates, but a pixel shader, even a trivial one, can''t be done reasonably in software.

Share this post


Link to post
Share on other sites