View Full Version : ARB_vertex_program doesn't want to be compiled for Radeon

05-22-2004, 10:28 PM
Hi! I have problem, this shader perfectly works on GF2GTS, but i have error in 20th line for Radeon(9600):"syntax error on pas 873 -Error on line 33: malfarmed declaration (hint: ',')". May be somebody know, what happening?=)

!!ARBvp1.0ATTRIB iPos = vertex.position;
ATTRIB iColor = vertex.color;
PARAM mvp[4] = { state.matrix.mvp };
PARAM cam_pos = program.local[0];
OUTPUT oPos = result.position;
OUTPUT oTex0 = result.texcoord;
OUTPUT oTex1 = result.texcoord[1];
OUTPUT oColor = result.color;
TEMP tmp
DP4 oPos.x, mvp[0], iPos;
DP4 oPos.y, mvp[1], iPos;
DP4 oPos.z, mvp[2], iPos;
DP4 oPos.w, mvp[3], iPos;
MOV oTex0.xy,iPos;
MUL oTex1.xy, iPos, 0.03125;
SUB tmp,iPos,cam_pos;
MOV tmp.z,0;
DP3 tmp,tmp,tmp;#<<here error
MAD oColor,tmp, -0.00102564,1.64103;END

05-23-2004, 04:28 AM

MOV tmp.z, 0.0;

one line above.


05-23-2004, 07:04 AM
no, it didn't help me=(
error is still in line
DP3 tmp, tmp, tmp;

05-23-2004, 10:13 AM
There is no ;

TEMP tmp;<---

but that should give error pointing to the next line, not 20th.

05-23-2004, 01:41 PM
eh, I saw this, i made misprint, when copied this code.

05-23-2004, 03:52 PM
I tested it myself with Cat 4.5 and it looks like a bug, but the problem is on line 21

MAD oColor, tmp, -0.0010256, 1.64103;

If you remove the '-', it compiles.


PARAM thing={-0.00102564, -0.00102564, -0.00102564, -0.00102564};

MAD oColor, tmp, thing, 1.64103;

You should email them.

05-23-2004, 11:01 PM
Thanks a lot! i almost have became crazy with this bug=)