Jump to content
  • Advertisement

Archived

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

d000hg

Want to use SW Vertex Shaders, confused.

This topic is 5736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Because I need to do lots of work to generate all my vertices every frame from compressed data, I believe a SW vertex shader may be quicker than doing it myself, due to SIMD optimisations (and obviously far quicker on shader-equipped hardware). However because I''m using this on non-shader cards, I need to know how to use a custom vertex shader with the default pixel shader utilised by the fixed function pipeline. Can someone tell me where to output the vertex data to (texcoords, colours, positions etc) so the pixel shader knows what to do with it please?
Read about my game, project #1 NEW (9th September)diaries for week #5 Also I''m selling a few programming books very useful to games coders. Titles on my site.
John 3:16

Share this post


Link to post
Share on other sites
Advertisement
oD0 and oD1 are D3DTA_DIFFUSE and D3DTA_SPECULAR
oT0 to oT7 are the texture coordinates after processing

There isn''t really anything else to know past what''s in the docs - what comes out of a shader "just works" with fixed function fragment (pixel) processing.
You output the post transform positions in oPos, after stuff like clipping the chip/D3D assembles these to form polygons - oD0 and oD1 and the coordinates are always interpolated across the polygon.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Does my idea sound good to anyone?

My decompression per vertex, per frame involves maybe 10 multiplies and a few adds, possibly a test or two.
Is a software Vshader likely to beat my SW code on MMX,SSE etc machines?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!