FVF or shaders?

Started by
6 comments, last by superpig 18 years, 10 months ago
I've heard the FVF to be a bit faster than the shader codes, so its better to take advantage of the Direct3D built-in render pipeline whenever possible. Am I right? or the new hardware provide acceptable speed? Also how can I get some demos and tutorials about pixel shaders? it seems that pixel shaders are less discussed, why?
Visit galaxyroad.com which soon will have english contents too
Advertisement
No, FVF codes are typically compiled into shader code so there won't be any difference. You should only really support FVF if you need to run on hardware that doesn't have shaders. But at the end of the day, it's up to you.
I have heard rumours that FVF may be removed from DX10, or at least moved into the D3DX library.
------------------------See my games programming site at: www.toymaker.info
Quote:Original post by vcGamer
I've heard the FVF to be a bit faster than the shader codes


Only on hardware older than a GFFX (or thereabouts). Shaders are usually faster on newer hardware because you can strip away all unnecessary operations.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Quote:Original post by superpig
Quote:Original post by vcGamer
I've heard the FVF to be a bit faster than the shader codes


Only on hardware older than a GFFX (or thereabouts). Shaders are usually faster on newer hardware because you can strip away all unnecessary operations.

Yes. IIRC:
Everything from ATi since the Radeon8500 implements the fixed-function pipe in shaders. nVidia's pre-GeForce FX have dedicated fixed-function lighting hardware, so they run the fixed-function pipeline faster.

Quote:Original post by Trip99
I have heard rumours that FVF may be removed from DX10, or at least moved into the D3DX library.
How can you put the fixed function pipeline in a utility library? You set render + texture stage states, set the vertex+index streams and basically set the shader to point to the FVF declaration for the vertex.
It would be a major pain having to write shaders to everything, line 2D HUD graphics, menu screens etc.

Quote:Original post by d000hgHow can you put the fixed function pipeline in a utility library?


Why not? Required state in, Shader code out. Simple. But then if you are on DX9+ you aren't likely to be using the fixed function path anyway.
Quote:Original post by Coder
Quote:Original post by superpig
Quote:Original post by vcGamer
I've heard the FVF to be a bit faster than the shader codes


Only on hardware older than a GFFX (or thereabouts). Shaders are usually faster on newer hardware because you can strip away all unnecessary operations.

Yes. IIRC:
Everything from ATi since the Radeon8500 implements the fixed-function pipe in shaders. nVidia's pre-GeForce FX have dedicated fixed-function lighting hardware, so they run the fixed-function pipeline faster.


Point of clarity: they run it faster for the same functionality. If your vertex shader is just 'mov oPos, v0' then you'll see it running faster than fixed function vertex processing on a GF3 [smile]

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement