Sign in to follow this  
Basic

Any reason not to use shaders?

Recommended Posts

Hi all, Shaders have caught my curiosity, and they seem like they can do anything. I've seen many advanced shaders, but I've also seen some other ones that kind of caught my attention. Simple vertex shaders, and shaders to do texture wrapping and that sort of thing. So is there any reason not to use shaders? I mean, would it be better to build in the functionality using say OpenGL to do the texture mapping of a model, or would it be better to just include the functionality to load up a shader file and use the shader file. What are the costs and benefits of each approach(assuming you're equally proficient in OpenGL as Shader programming)? Thanks for any clarification.

Share this post


Link to post
Share on other sites
Shaders are very expensive computationally, and you'll have to worry about whether a certain videocard supports a certain level of shader maturity. Even today, a majority of machines shipped do so without pixel or vertex shader support.

Other than that, you might as well go ahead with it.

Share this post


Link to post
Share on other sites
Well my initial response would be to go with shaders. Although its true that not every card supports them, eventually they will. However if you want to port your code to say PDA or mobile devices it may still be a while before shaders are supported at all.
So my suggestion is have your code support both. This may sound bad but in the end all it means is that you program the non shader functionality code then add the possibility for objects to have an attached shader that overrides the rest.

-CProgrammer

Share this post


Link to post
Share on other sites
Depends on what kind of systems you're targeting. Modern graphics cards emulate the fixed function pipeline through shaders, so in those cases, there's absolutely no reason not to use shaders.

If you're targetting casual gamers using an ancient integrated Intel gpu, it might be a problem. Or if you want the game to run on a PDA...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this