PDA

View Full Version : Fragment shader parameters



vince
07-23-2003, 05:41 AM
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.

vincoof
07-23-2003, 06:18 AM
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 ?

vince
07-23-2003, 07:12 AM
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 ;-)

vince
07-23-2003, 07:13 AM
Win 2000 or win XP, same thing. Latest available drivers.

titan
07-23-2003, 07:18 AM
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 http://www.opengl.org/discussion_boards/ubb/frown.gif

Madoc
07-23-2003, 07:51 AM
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...

Eric Lengyel
07-23-2003, 08:09 AM
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.

vince
07-23-2003, 08:22 AM
Do you have an idea when they plan to release their new driver?

vincoof
07-25-2003, 12:44 PM
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.

davepermen
07-27-2003, 01:43 PM
similar issue here..

ati radeon9700pro, cat3.6

void AsyncOpenGLBlitter::setExposure(float k) {
me->exposure_k = k;
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_A RB,0,k,k,k,0.f);
glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB,GL_PROG RAM_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..

vince
07-29-2003, 04:47 AM
I tried too with a ATI Radeon 9700 Pro, and it works fine.

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

M/\dm/\n
07-29-2003, 05:26 AM
I think you can find newer (leaked) drivers somewhere at guru3d. They seem to work fine for me.

vince
07-29-2003, 09:27 AM
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.