Jump to content
  • Advertisement
Sign in to follow this  
Undertaker

Vertex & Pixel shaders slower than fixed function pipeline ?

This topic is 5404 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
You may post the shaders so we can have a look and see if there is something that can be optimized

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!