Fragment shader parameters

Hi,

When I try to use the OpenGL fog color in my ARB fragment program, it seems to use the fog color it had at the time I created the shader. After that, none of my OpenGL calls would change the colors.

I tought of a driver bug only for the fog color, so I tried I tried sending the color through a glProgramEnvParameter4fvARB call. Same result: after the shader is created, the value seems to be fixed.

Anybody has an idea on what causes my parameters value not to change?

Thanks.

Maybe it really is a driver bug ?
What is your systems specs (gfx card, OS, driver, etc) ?
Have you tried it on other system ? If not, can you share a test app to the community so that we can test it ?

That’s a very good question. I guess I forgot to mention it.

I’m using a GeForce FX 5900 ultra, but I noticed the same problem on a GeForce FX 5600 as well.

On an ATI 9700, I don’t have a problem.

And unfortunately, I can’t provide the code. It’s part of a very large S/W that I don’t think you’re willing to go through :wink:

Win 2000 or win XP, same thing. Latest available drivers.

I’ve found the same problem with fragment_program on nv3x cards. Hopefully the next driver set will fix this.

In the mean time you have to reupload the program everytime you want to change a variable

I have the same problem too, but it just suddenly started behaving like this without me changing the drivers. My parameters used to come through fine. Strange driver bug, and it needs fixing.
It’s been a while since they released some new drivers…

This is a known bug in Nvidia’s 44.03 driver. I know it’s fixed in later drivers (which aren’t available to the public yet), and I also believe it doesn’t show up in previous drivers. So if you can roll back to an earlier driver, the problem might go away.

Do you have an idea when they plan to release their new driver?

It works fine for me, with the NVIDIA linux driver 43.63

I’m using fog in the fragment program, and I change the fog color during the rendering and I can see that the fragment program does take into account the newly defined fog color.

similar issue here…

ati radeon9700pro, cat3.6

void AsyncOpenGLBlitter::setExposure(float k) {
me->exposure_k = k;
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB,0,k,k,k,0.f);
glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB,GL_PROGRAM_FORMAT_ASCII_ARB,exposure.length(),exposure.c_str());
}

if i don’t re-upload the shader, there is no change visible, even while i change k…

I tried too with a ATI Radeon 9700 Pro, and it works fine.

For the GeForce FX 5900, I only tried the windows version

I think you can find newer (leaked) drivers somewhere at guru3d. They seem to work fine for me.

Thanks for the guru3d link. I tried the latest driver I found there and you’re perfectly rigth, it fixes my problem. And I get slightly better performances as well.