PDA

View Full Version : ARB_vp & ARB_fp problem



esc
10-30-2003, 02:03 PM
I'm trying to write an ARB_vp/ARB_fp path, but the result registers behave strangely.

Example with unnecessary stuff excluded:

ARB_vp:
ATTRIB test1 = vertex.texcoord[0];
PARAM test2 = { 0,0,1,1 };

# (I change between these two)
MOV result.color, test1; # Example 1
MOV result.color, test2; # Example 2


ARB_fp:
MOV result.color, fragment.color;


Now, whenever I write to ARB_vp result.color with vertex attribues, everything goes well (example 1). But whenever I try to use a PARAM (example 2), I get a static color that changes when I rotate the world (result undefined?).

Does anybody have any idea what the problem might be, I've search the extension spec and search this forum's archive, but it's getting really frustrating...

Any help appreciated.

Chris

sqrt[-1]
10-30-2003, 02:30 PM
What card/driver revision are you using?
(some of the real early ATI drivers had ARB_vp messed up in some places)

have you also tried:

MOV result.color, {0,0,1,1};

or tried:

PARAM test2 = { 0,0,1,1 };
OUTPUT oColor = result.color;

MOV oColor, test2;

esc
10-30-2003, 02:38 PM
have you also tried:

MOV result.color, {0,0,1,1};

or tried:

PARAM test2 = { 0,0,1,1 };
OUTPUT oColor = result.color;

MOV oColor, test2;

[/B]


I use the latest nVidia drivers 52.16.

I tried what you say, and I still get a single color that changes when I rotate the camera.

And here's more strange stuff:

ARB_vp:
PARAM test1 = { 1, 1, 1, 1 };
MOV oColor, { 1, 1, 1, 1 };
MOV oColor, test1;

The two MOVs generate different colors, neither is white...

I'm totally puzzled...

Zengar
10-30-2003, 04:46 PM
Could you provide more information on your computer? Card, OS etc. I never had anything like that with my 52.16(GF5600 on XP). Try using earlier driver. Maybe your card is somehow damaged http://www.opengl.org/discussion_boards/ubb/smile.gif

esc
10-31-2003, 04:12 AM
Ok, found the problem, could be a bug, would be nice to get some comments from nvida guys...

I used drivers 52.16 on a Geforce FX 5900 card.

The problem occurred when I used OPTION ARB_position_invariant, when I removed this, everything worked fine.

So, once again, the symptom:

When using pos_invariant, only the vertex attributes could be written to the result registers.

Whenever I tried a constant, i.e.
PARAM test = { 1,1,1,1 }; or
PARAM testL = program.local[0];
or a temporary i.e.
TEMP test2;
MOV test2, {1,1,1,1};
these values wasn't written to the result registers correctly.

Any ideas why this happened?

Chris