PDA

View Full Version : Texture coord screwed up in a vertex program



Lev
08-07-2003, 02:37 PM
I'm having troubles getting a _very_ simple vp to work:
-------------------------
!!ARBvp1.0

ATTRIB pos = vertex.position;
ATTRIB tex = vertex.texcoord;
PARAM mat[4] = { state.matrix.mvp };

DP4 result.position.x, mat[0], pos;
DP4 result.position.y, mat[1], pos;
DP4 result.position.z, mat[2], pos;
DP4 result.position.w, mat[3], pos;

MOV result.texcoord, tex;

END
-----------------------------

Texture mapping doesn't get right (I'm using EXT_texture_rectangle). My texture turns black, except the few first pixels. Can there be a problem with the unnormalized texcoords required by EXT_texture_rectangle? Anything else I forgot?

Regards
-Lev

jra101
08-07-2003, 03:56 PM
Are you specifying your texture coordinates in the [0,texturewidth]x[0,textureheight] range?

If so, it should work fine, it does for me at least.

Lev
08-07-2003, 04:52 PM
Yes I do, if I turn off the VP (and use the fixed function transform) everything works. Also I checked that result.position gives me valid and correct values, it's just the texture that is screwed up.

-Lev

jra101
08-07-2003, 05:02 PM
If you are running a NVIDIA card, please send me an app that reproduces the problem, (preferably with source) and I'll file a bug if I can reproduce it.

Otherwise, send the app to your video card vendor's developer support people.

Lev
08-11-2003, 05:44 AM
The problem does not occur with NVIDIA card (GF4), just tested it. So it looks like ATI driver bug. Anyone knows where should I send it?

Regards
-Lev

Tom Nuydens
08-11-2003, 07:22 AM
devrel@ati.com