Sign in to follow this  
InfestedFurby

Shaders vs FFP speed

Recommended Posts

InfestedFurby    122
I'm considering switching my current FFP code to shaders, but I'm wondering if there would be any speed issues. Specifically, on old cards (such as 1st gen ps 1.1 cards), will I see a slowdown if I implement basic pixel operations like blending in a shader? I've heard that newer cards just convert FFP operations to shaders internally, so there would be no speed difference, but is this true of older cards as well?

Share this post


Link to post
Share on other sites
mattnewport    1038
Many of the old shader model 1 cards from DirectX 8 days had some dedicated fixed function hardware alongside the newer programmable hardware and on those cards fixed function code could run faster than equivalent shader code. Shader model 2 cards and newer have no hardware dedicated to the fixed function pipeline, on those cards all fixed function rendering is done using shaders generated on the driver according to the currently set fixed function render states.

On those cards a well written shader will often be faster than using the FFP and letting the driver handle it because you can drop out anything you don't need and only include exactly those features you want. Often you'll be able to implement effects in a simpler way using fewer passes or taking advantage of some vertex or pixel shader features to do things in a more efficient way as well so using shaders should be faster overall, not to mention all the things you'll be able to do that simply weren't possible in hardware using the FFP.

Share this post


Link to post
Share on other sites
J_M_S    122
Quote:
Original post by mattnewport
Shader model 2 cards and newer have no hardware dedicated to the fixed function pipeline, on those cards all fixed function rendering is done using shaders generated on the driver according to the currently set fixed function render states.


True for ATI but at least nVidia's GeForce FX cards have a hardware FFP implemented in hardware and maybe newer ones, too.
Personally, i think it's totally ok, to do everything with shaders.

Share this post


Link to post
Share on other sites
madgodz    122
Quote:
Original post by mattnewport
On those cards a well written shader will often be faster than using the FFP and letting the driver handle it because you can drop out anything you don't need and only include exactly those features you want.


exactly. normalizing vertex normals is a perfect example of something may not be necessary but the FFP requires it.

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