Strange problem linking fragment shaders..

Started by
12 comments, last by Rosalia 14 years, 4 months ago
Quote:Original post by Rosalia
Emulating the fixed function pipeline vertex shader shouldn't be a problem, at least I didn't understand vincoofs point about performance and uncompatibilities, since using no shader is, after compiling, the same as using a "default" shader.

In theory, yes. In practice, performance may vary for a 'default' shader depending on the graphics card you run it (sometimes will be faster than fixed, sometimes slower, sometimes the same). As for compatibility, the fact is that the fixed-function pipeline is updated whenever the GL spec changes and the driver is updated. If you write your own vertex shader and use a newer version of GL, you may have to rewrite up to all your vertex shaders to benefit the new functionalities, work that is unneeded for fixed-function pipeline. This is more an issue for long-living games where you can afford to update your 3D engine, though.
Advertisement
I don't think the difference between using fixed function pipeline and a vertex shader that multiplies the vertices by the modelviewproj matrix would be an issue in *any* case.

Quote: If you write your own vertex shader and use a newer version of GL, you may have to rewrite up to all your vertex shaders to benefit the new functionalities, work that is unneeded for fixed-function pipeline"


Since the only shader you avoid by using the fixed-function pipeline is the "default" shader, you'd only have to update one shader more. And it multiplies the vertices by the modelviewproj matrix, you can live without new functionalities, if you *just can't* update this one shader.

Everything said, I would definitely suggest you just use it, if it fixes the problem with ATI cards. In my opinion this is a much more relevant compatibility issue.
Rosália G. Schneiderhttp://rosaliaschneider.wordpress.com/
Quote:Original post by Rosalia
I don't think the difference between using fixed function pipeline and a vertex shader that multiplies the vertices by the modelviewproj matrix would be an issue in *any* case.
The fixed function pipeline does a lot more than 'multiplies the vertices by the modelviewproj matrix'. It also transforms normals, passes through texture coordinates, computes per-vertex lighting (if enabled), per-vertex fog (if enabled), etc.

If all you need is vertex and normal transformation, then by all means use a simple shader, but replacing the fixed function pipeline in its entirety is not a trivial task.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Very true. I'll stick to the advice, anyway ;-)
Rosália G. Schneiderhttp://rosaliaschneider.wordpress.com/

This topic is closed to new replies.

Advertisement