Jump to content
  • Advertisement

Archived

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

Drilian

D3DXEffect vs. Texture vs. My Own Effect Class

This topic is 6022 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

Alright, so this question is a two-parter: 1. I have a D3DXEffect set per-object. Should I sort by Texture then by Effect, or by Effect then by Texture to be more efficient? 2. Should I USE D3DXEffect, or should I write my own class that has the same capability? I mean, is it like D3DXFont, where you don''t want to use it in a real production because it''s really slow, or can I say "D3DXEffect isn''t going to slow me down any more than my own code would"? Thanks, Josh

Share this post


Link to post
Share on other sites
Advertisement
Quote NVIDIA here:

Regarding PS and VS state changes

"This is an intrinsically expensive state change
I’ve seen apps for which this is the “thing-to-sort-by”
Which means it can be more expensive than texture changes"

Neil


WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites
It is unlikely that you will beat the performance of D3DXEffect, since D3DXEffect uses stateblocks. You can use the binary format for faster loading.

Usually, it is fastest to sort by texture. However, since in most scenarios ps vs shaders require different textures (i.e. a bump map shader can''t use the same textures as another), you might want to sort by vertex/ps pair first, and then sort by textures.

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!