OpenGL standard pixel shading

I have a ATI 9200 video card. I want to use pixel shading 1.0 for a project I’m doing for school. Is there a OpenGL standard extenstion that I can use to enable pixel shader 1.0? I want to be able to run my program with ATI and NVidia cards without writing different code paths. I also want to avoid using DirectX.

I tried googling the subject but all I found was DirectX articles.

Will NVidia’s CG run with ATI cards? My guess is no.

There is the extension ARB_texture_env_combine (or so), which is the first (and very simple) version of a “pixel shader”.

That´s the only cross-vendor stuff you can use on a 9200 (and Gf 1+, i think).

The next cross-vender thing would be ARB_fragment_program, but that is only supported by 9500+ and Gf 5. So that won´t be useful to you.

Jan.

Since fragment programs are not supported on my card, does any one have a good suggestion on how to (in real time) replace pixels of a certain color with another color. For example replace all 100% green pixels being drawn on to the framebuffer with 100% red pixels. Eventually I want to be able to replace a group of colors with another group of colors.

Cg is simply nVIDIA’s version of HLSL, infact it was developed specifically with microsoft to be compatible.

so there is very little difference between the two formats.
the major difference you’ll notice is in the declarations you make for the variables and the fact that Cg covers OpenGL/DX8/DX9 all in one.

it will automatically adjust to whatever card it is using, which means it’ll work on any card with fragment and vertex shaders.

currently this includes;
Radeon 8500/9-Series
GeForce 3/4Ti/FX-Series
S3 Delta Chrome
SiS Xabre
Matrox Perhilia

(and ofcourse most of the 2002+ Hi-End GL cards)

the SDK is only 140mb for the general stuff, so download it and take a look; and the manuals + compiler + runtimes are all also in sperate packages.

it is much easier to code shader in C than it is in ASM

Originally posted by RavenL:
Radeon 8500/9-Series

Somebody told me this is not true.

Originally posted by RavenL:
only 140mb

“only”?

As for the topic, maybe texture_env_crossbar may be needed to do some redirections (not sure, never taken it really seriously) looks like it’s supported by all but NV which has a different behaviour.