Vertex & Pixel shaders slower than fixed function pipeline ?
I made a simple textured room and compared fps with the vertex program enabled and then disabled.
When vertex shader enabled , the fps is about 50 fps lower ( that is from 900 to 850 )
Same goes for pixel shader.
Are the vertex & pixel shaders slower than fixed function pipeline or am I doing something wrong ?
When at such a high framerate diffrence really doesn't mean too much. I would be intrested in hearing how they compair with 40k triangles on screen. (or how many you need to get 40ish fps).
I've always used them assuming the diffrence really wasn't much but I've not tested it myself.
I've always used them assuming the diffrence really wasn't much but I've not tested it myself.
I believe in newer cards the fixed-fuction pipeline doesn't actually exist, and the drivers simply create shaders under the hood anyway. There may be small optimizations that can be performed when you let the drivers create the shaders to emulate the fixed-function pipepline, but it shouldn't be too large. And as skow said, when you're running at 900 FPS, losing 50 FPS isn't really all that significant at all. It definitely does not mean that if you were initially running at 80 FPS, you'd then be running at 30 FPS. More like 75 FPS.
[edit]Yeah, my math is wrong. The point is, dropping from 900 to 850 is a lot less severe than it may seem at first. Less severe even than my pathetic math shows. I'm too lazy to redo it correctly, though. :-) Here is the common link to explain the situation.[/edit]
[Edited by - Agony on September 24, 2004 8:27:45 AM]
[edit]Yeah, my math is wrong. The point is, dropping from 900 to 850 is a lot less severe than it may seem at first. Less severe even than my pathetic math shows. I'm too lazy to redo it correctly, though. :-) Here is the common link to explain the situation.[/edit]
[Edited by - Agony on September 24, 2004 8:27:45 AM]
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
The fixed-function pipeline has been around for so long, that I think most drivers have micro-optimized them insanely... Though, the compilers for vertex and pixel programs might not be as optimized...
Well even a difference of 5 fps would mean alot on games like doom 3.
I will try it on a larger scene and return with the results.
I will try it on a larger scene and return with the results.
First of all, yes, new graphic cards don't have a fixed function pipeline. The fixed function pipeline is simulated via vertex and pixel shaders.
The difference in FPS you said may has different reasons. Maybe the shader you wrote isn't that optimized as the shader written by the hardware vendor to simulate fixed function. Another reason may be that when using fixed function the hardware can you some features which it isn't allowed to use when having shader. For example NV GeForce FX series. In fixed function the graphic card can use the register combiner, but if you use shader these combiners are not allowed to use because of data type precision of register combiners.
The difference in FPS you said may has different reasons. Maybe the shader you wrote isn't that optimized as the shader written by the hardware vendor to simulate fixed function. Another reason may be that when using fixed function the hardware can you some features which it isn't allowed to use when having shader. For example NV GeForce FX series. In fixed function the graphic card can use the register combiner, but if you use shader these combiners are not allowed to use because of data type precision of register combiners.
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
Quote: Original post by Undertaker
Well even a difference of 5 fps would mean alot on games like doom 3.
At 30 fps, the difference you're talking about would mean that it would run at 29.94fps, instead of 30. Somehow I doubt anyone would notice.
Remember to use frame-times, instead of frames-per-second. The difference between your 900fps and 850fps is 65 microseconds ( approximately ). The frame time of a frame at 30 fps is 33.3 milliseconds. Taking your 65 microsecond speed hit into account, the new frame time ( assuming you were running at 30fps ) would be 0.033398 seconds, or 33.398 milliseconds, which works out at about 29.94fps. Not as much of a difference now is it? [smile]
[Edited by - python_regious on September 24, 2004 10:31:42 AM]
If at first you don't succeed, redefine success.
You may post the shaders so we can have a look and see if there is something that can be optimized
_____________________________________http://www.winmaze.de, a 3D shoot em up in OpenGL, nice graphics, multiplayer, chat rooms, a nice community, worth visiting! ;)http://www.spheretris.tk, an upcoming Tetrisphere clone for windows, a 3D tetris game on a sphere with powerful graphics for Geforce FX and similar graphics cards.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement