Jump to content
  • Advertisement
Sign in to follow this  
FreJa

when to use shaders?

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

Hi, Is it always better to use shaders when possible? For example, i need to display a skybox, should I use shaders to handle the texturing? Thanks

Share this post


Link to post
Share on other sites
Advertisement
There's no disadvantages to using shaders, and in some cases there are speed advantages (on modern hardware). Basically there's nothing wrong with designing your engine so that it does not use the fixed function pipeline at all, and that's probably the best forward-looking way.

Share this post


Link to post
Share on other sites
Quote:
Original post by AndyTX
There's no disadvantages to using shaders, and in some cases there are speed advantages (on modern hardware). Basically there's nothing wrong with designing your engine so that it does not use the fixed function pipeline at all, and that's probably the best forward-looking way.


y.. thats what I thought. However, I tried that example I gave (a skybox) with and without shaders, and there was an increase of mem usage with shaders of about 10k.
I'm guessing shaders advantages are more noticeable on bigger apps...

Share this post


Link to post
Share on other sites
With recent video cards the fixed-function pipeline is actually emulated with shaders... so you're just cutting out the middleman and giving yourself more power.

Share this post


Link to post
Share on other sites
When to use shaders?

When the fixed pipeline doesn't suit your needs. Otherwise, I'd stick to the pipeline, because I almost garuntee it's going to be faster...

Share this post


Link to post
Share on other sites
There really isn't any advantage in NOT using shaders, and in DX10 the FFP is going away entirely. I would guess the increase in memory usage is due the effects framework, which is pretty ineffecient in DX9. If it is issue you can circumvent it and compile the vertex/pixel shader directly (though this will mean doing with out the nice technique/parameter interface the FX framework gives you, and set shaders registers directly).

edit - Doh! I guess without that 'not' this post did not make much sense :-)


[Edited by - griffin2000 on October 6, 2006 12:40:15 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by dbzprogrammer
When to use shaders?

When the fixed pipeline doesn't suit your needs. Otherwise, I'd stick to the pipeline, because I almost garuntee it's going to be faster...
On anything better than about a GF3, the fixed pipeline will be slower.

Share this post


Link to post
Share on other sites
Quote:

Otherwise, I'd stick to the pipeline, because I almost garuntee it's going to be faster...


This is blatantly incorrect.

Share this post


Link to post
Share on other sites
Actually, I think NVIDIA kept optimizing the fixed pipeline well through the 5000 series. Starting with the GF 6000, however, I don't think you'll get any benefit from the fixed pipeline -- and switching back and forth will clearly be slower.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!