tweaking glShadeModel

Hi, does anyone know what kind of interpolation is performed when glShadeModel(GL_SMOOTH) is used?
I get the feeling it’s bilinear.
I need to be able to specify my own interpolation function, or at least to have a wider selection. Is there any way to do this?

I’m not worried about lighting – I just need the colors from vertices to be interpolated across my triangles using something a little more accurate than bilinear.

Thanks in advance.

[Edit: clarity]

Most implementations nowadays use perspectivecorrect bilinear filtering i think.

You cannot change the model itself, but you can assign texturecoords instead of colors and upload a texture of choice that will be the interpolation. or you can move to fragmentprograms and pretty much do whatever you want with the shading system

Originally posted by malancha:
Is there any way to do this?

Yes, vertex and fragment programms.

Thanks, guys.

Can you point me to some tutorials for the techniques you mentioned? I’ve been googling for a while now, and haven’t been able to come up with much.