Sign in to follow this  
Nairou

Shader limitations?

Recommended Posts

I'm still new to vertex and pixel shaders, but from what I can see, shaders are the big thing right now, using pixel and vertex shaders to not only improve visual quality but to also move more of the work onto the GPU, freeing the CPU for other tasks. They can be used for anything from lighting, to material effects, to terrain LOD or animation. My question is, how far can you take them? When designing an engine, with the intention of using shaders as fully as possible, how big does that circle of possible uses become? If you're using shaders not only for rendering but these other things like animation and LOD (I'm sure there are other examples), its hard to plan where the limits are, what you can leave to a shader program and what you still need to hardcode into the engine design. I know this is a rather vague question, I'm just looking for opinions and experiences here.

Share this post


Link to post
Share on other sites
As your GPU computations become more and more complicated, you will quickly realize the limitations of the hardware itself. Instruction counts, constant register limitations, texture reads, as well as other bounded resources, can put a damper on just how CPU-like the GPU can be. You can get quite creative with it, however.

Also, you have to remember to code for older vertex and pixel shader versions as well. Many consumer cards have either a low VS/PS version, or none at all (thanks to the GF4 MX [smile]). If you are designing a serious graphics engine, you have to provide backwards compatability for these shading models. More times than not, this means cutting at least some, if not all, of the advanced eye candy.

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