Texture shader issue on GeForceFX 5900

Hello,
I recently got a GFFX and I have a weird problem with texture shaders in one of my program.
In this program I make a DOT3 diffuse+specular bump mapping using texture shaders & register combiners.

Here what I got on my “old” GF4: http://drtypo.free.fr/trucs/tsgf4.jpg

On my brand new GFFX, I get this crappy result: http://drtypo.free.fr/trucs/tsgffx.jpg
(also notice the poor framerate)

When you get close to the object, it looks burned (GeForceFX shot): http://drtypo.free.fr/trucs/tsburned.jpg

The issue doesn’t come from register combiners: when I disable them, the burning effect (and poor framerate) still happens.
When I disable the texture shader, the bump mapping is of course gone but the framerate is normal again (~600 fps).

The texture shader used the following one :
glActiveTextureARB(GL_TEXTURE2_ARB);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV, GL_EXPAND_NORMAL_NV);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DOT_PRODUCT_PASS_THROUGH_NV);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE1);
(it is the texture shader for the diffuse component, same shader for specular component on texture unit 3).

I also made a test with a GL_DOT_PRODUCT_TEXTURE_2D_NV shader. In this case there is no burning but still a poor framerate. Thus I suspect the same thing is going on.
It seems there is something that raises the result of the texture shader to a high power. This would explain the burning and the low framerate.
BTW the whole object rendering (combiners, shaders, geometry) is stored in a display list.

Apart from this issue the GeForceFX is working perfectly well. I tested Dawn, Dusk, Ogre and Toys demos and they run smoothly.
I also tested GF3&4 demos (Chameleon and Werewolf) and they also work well.

System spec:
AthlonXP 2000+
512MB DDR
GeForceFX 5900 128MB (MSI)
Chipset VIA KT400
WindowsXP SP1
Drivers tested: 44.65 & 45.23

You can get an executable here: http://drtypo.free.fr/trucs/ppl014e.zip


DrTypo

You should forget about display lists when using vp/fp and other thing like that. All you’ll get in the end will be crap.

I remade the render code, now using vertex arrays.
The problem is still there.


DrTypo

The program looks fine on my GeForceFX 5800 Ultra, which GeForce FX are you running?

Originally posted by jra101:
The program looks fine on my GeForceFX 5800 Ultra, which GeForce FX are you running?

I run a MSI GeForce FX 5900, with 44.65 drivers (I also tested 45.23, same problem).

What drivers are you using?


DrTypo

Just talked to another engineer here and it looks like the problem you are seeing has already been fixed. The fix will be available in the next driver release.

Originally posted by jra101:
Just talked to another engineer here and it looks like the problem you are seeing has already been fixed. The fix will be available in the next driver release.

Fine!
Thanks for your feedback.


DrTypo

Beside us too there is other problem.
Problem in FPS.

We tested this on three 3D cards.

GeForce2 MX 400 - 14 FPS
GeForce4 MX 400 - 1 FPS
GeForceFX 5200 - 5 FPS

why such difference? GeForce2 works quicker than GeForce4 or GeForceFX. The Same CodePath.

You may see demo: http://www.bev-team.com/template/PixelLightScene.exe

radeon 9600 = 19 fps

bozland -> I get 29fps with your program (default settings).

About my texture shader issue, it turns out there are TWO bugs!

Bug no1: texture “burning”. I still don’t know why it happens. Well, according to jra101 it’ll be corrected in the next driver release…

Bug no2: low framerate. This one is related to polygon mode.
I’m switching polygon mode to render collision data in wireframe.
I was doing this:
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
… do stuff…
glPolygonMode(GL_FRONT, GL_FILL);
I should’ve written GL_FRONT_AND_BACK when switching back to GL_FILL.
On my GF4 Ti it didn’t cause any trouble but the GFFX doesn’t like it at all!
The framerate is normal on the GFFX when I correctly switch back to glPolygonMode(GL_FRONT_AND_BACK, GL_FILL).

The low framerate bug (feature?) happens only when either texture shaders or fragment programs are activated.

BTW I originally guessed that the low framerate with fragment programs was not related to my previous texture shader issue. I thought that it was because fragment programs were just very slow. I turns out that they are more than 3 times faster than I thought before.


DrTypo