Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dpn), 1,328 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
error x3000! #45331
05/06/05 23:00
05/06/05 23:00
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline OP
Senior Developer
Josh_Arldt  Offline OP
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
What's wrong with this effect?
I always get an error x3000 unexpected token "F":
I also get buttload of uninitialised components errors.

Code:
 matrix matWorldViewProj;
matrix matWorld;

texture entSkin1;
texture mtlSkin1;

vector vecLight;

technique dot3map
{
pass p0
{
Texture[0] = <mtlSkin1>;//2te Skin im Model ist die Normal Map
Texture[1] = <entSkin1>;//1te Skin im Model ist die Textur

COLOROP[0] = DotProduct3;
COLORARG1[0] = Texture;
COLORARG2[0] = Diffuse;

COLOROP[1] = Modulate;
COLORARG1[1] = Texture;
COLORARG2[1] = Current;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]=<matWorld>;
VertexShaderConstant[18]={1F,1F,1F,1F};
VertexShaderConstant[19]={0.5F,0.5F,0.5F,0.5F};
VertexShaderConstant[20]= <vecLight>;
VertexShaderConstant[30]={0F,1F,0F,0F};
VertexShaderConstant[31]={1F,0F,0F,0F};
VertexShaderConstant[32]={0F,0F,1F,0F};
VertexShaderConstant[90]={1F,0F,0F,0F}; //damit oFog gefüllt ist

VertexShader =
decl
{
Stream 0;
Float v0[3]; //Position
Float v3[3]; //Normal
Float v7[2]; //Textur Koordinaten 0
}
asm
{
vs.1.0
m4x4 oPos, v0, c0
m4x4 r10,v0,c4
m3x3 r8,v3,c4
mov oT0, v7
mov oT1, v7
mov oT2, v7
mov oT3, v7

//calculate texture space matrix from normal and up
mul r0,c31,v3.zxyw //-1,0,0
mul r1,c32,v3.yzxw //0,0,-1
sub r0,r1,r0

dp3 r0.w,r0,r0
rsq r0.w,r0.w
mul r0,r0,r0.w //normalized right vector

mov r1, c30 //0,-1,0
mov r2, r8

sub r9,c20,r10

dp3 r9.w,r9,r9
rsq r9.w,r9.w
mul r9,r9,r9.w //normalized light vector

m3x3 r3,r9,r0
mov r3.w,c30.w //transform light to texture space

add r3,r3,c18 //bias
mul r3,r3,c19//scale
mov oD0,r3
mov oFog,c90
};
}
}



Re: error x3000! [Re: Josh_Arldt] #45332
05/07/05 03:31
05/07/05 03:31
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
It's written in DirectX 8 syntax, should be in DirectX 9. Couple of thinks like the vs decl section have been changed around.


--Eric
Re: error x3000! [Re: Nadester] #45333
05/07/05 04:05
05/07/05 04:05
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline OP
Senior Developer
Josh_Arldt  Offline OP
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Quote:

It's written in DirectX 8 syntax, should be in DirectX 9.




I am aware of this.
I need to know what I need to change.

Re: error x3000! [Re: Nadester] #45334
05/07/05 14:34
05/07/05 14:34
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Havn't tested, but this might work:

Code:
matrix matWorldViewProj;
matrix matWorld;

texture entSkin1;
texture mtlSkin1;

vector vecLight;

technique dot3map
{
pass p0
{
Texture[0] = <mtlSkin1>;//2te Skin im Model ist die Normal Map
Texture[1] = <entSkin1>;//1te Skin im Model ist die Textur

colorOp[0] = DotProduct3;
colorArg1[0] = Texture;
ColorArg2[0] = Diffuse;

colorOp[1] = Modulate;
colorArg1[1] = Texture;
colorArg2[1] = Current;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]=<matWorld>;
VertexShaderConstant[18]={1F,1F,1F,1F};
VertexShaderConstant[19]={0.5F,0.5F,0.5F,0.5F};
VertexShaderConstant[20]= <vecLight>;
VertexShaderConstant[30]={0F,1F,0F,0F};
VertexShaderConstant[31]={1F,0F,0F,0F};
VertexShaderConstant[32]={0F,0F,1F,0F};
VertexShaderConstant[90]={1F,0F,0F,0F}; //damit oFog gefüllt ist

VertexShader=asm
{
vs.1.0
Stream 0;
dcl_position v0; //Position
dcl_normal v3; //Normal
dcl_texcoord0 v7; //Textur Koordinaten 0

m4x4 oPos, v0, c0
m4x4 r10,v0,c4
m3x3 r8,v3,c4
mov oT0, v7
mov oT1, v7
mov oT2, v7
mov oT3, v7

//calculate texture space matrix from normal and up
mul r0,c31,v3.zxyw //-1,0,0
mul r1,c32,v3.yzxw //0,0,-1
sub r0,r1,r0

dp3 r0.w,r0,r0
rsq r0.w,r0.w
mul r0,r0,r0.w //normalized right vector

mov r1, c30 //0,-1,0
mov r2, r8

sub r9,c20,r10

dp3 r9.w,r9,r9
rsq r9.w,r9.w
mul r9,r9,r9.w //normalized light vector

m3x3 r3,r9,r0
mov r3.w,c30.w //transform light to texture space

add r3,r3,c18 //bias
mul r3,r3,c19//scale
mov oD0,r3
mov oFog,c90
};
}
}




--Eric
Re: error x3000! [Re: Nadester] #45335
05/07/05 15:35
05/07/05 15:35
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Your error is in these:
Code:
{1F,1F,1F,1F};



In dx9, any time that a number is followed by a 'f' (meaning float) it must have a decimal in the number, a simple fix is to change it to look like:

Code:
{1.0f,1.0f,1.0f,1.0f};



Note- I have also changed the F's to f's, I'm not certain if dx9 recognizes them when uppercase.

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: error x3000! [Re: Rhuarc] #45336
05/07/05 15:55
05/07/05 15:55
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Dx9 is also fussy about the cases in the FFP code, that may need to be edited.


--Eric
Re: error x3000! [Re: Nadester] #45337
05/07/05 21:12
05/07/05 21:12
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline OP
Senior Developer
Josh_Arldt  Offline OP
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Thanketh you very mucheth ye dudes!

Re: error x3000! [Re: Josh_Arldt] #45338
05/07/05 21:58
05/07/05 21:58
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline OP
Senior Developer
Josh_Arldt  Offline OP
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Now I am getting this error:

Quote:


Error in effect:
rk_wall(36): error X5326: Read of uninitialized components(*) in v0: *x/0 *y/1 *z/2 *w/3
(37): error X5326: Read of uninitialized components(*) in v0: *x/0 *y/1 *z/2 *w/3
(38): error X5326: Read of uninitialized components(*) in v3: *x/0 *y/1 *z/2 *w/3
(39): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/2 *w/3
(40): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/2 *w/3
(41): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1





Re: error x3000! [Re: Josh_Arldt] #45339
05/07/05 22:00
05/07/05 22:00
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Did you use the changes that Nadester mentioned, the variable declarations changed (note the decl_ lines he added and the decl {} that he removed)?

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: error x3000! [Re: Rhuarc] #45340
05/07/05 22:07
05/07/05 22:07
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline OP
Senior Developer
Josh_Arldt  Offline OP
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Quote:

Did you use the changes that Nadester mentioned, the variable declarations changed (note the decl_ lines he added and the decl {} that he removed)?




Oh, oops.

Now I changed that and I get:
Quote:


Error in effect:
rk_wall(29): error X2000: syntax error: unexpected token 'Stream'
(37): error X5326: Read of uninitialized components(*) in v0: *x/0 *y/1 *z/2 *w/3
(38): error X5326: Read of uninitialized components(*) in v0: *x/0 *y/1 *z/2 *w/3
(39): error X5326: Read of uninitialized components(*) in v3: *x/0 *y/1 *z/2 *w/3
(40): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/2 *w/3
(41): error X5326: Read of uninitialized components(*) in v7: *x/0 *y/1 *z/2 *w/3
(42): error






Here is the changed code:
Code:
 matrix matWorldViewProj;
matrix matWorld;
texture entSkin1;
texture mtlSkin1;
vector vecLight;
technique dot3map{
pass p0
{
Texture[0] = <mtlSkin1>;//2te Skin im Model ist die Normal Map
Texture[1] = <entSkin1>;//1te Skin im Model ist die Textur
COLOROP[0] = DotProduct3;
COLORARG1[0] = Texture;
COLORARG2[0] = Diffuse;
COLOROP[1] = Modulate;
COLORARG1[1] = Texture;
COLORARG2[1] = Current;
VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]=<matWorld>;
VertexShaderConstant[18]={1.0f,1.0f,1.0f,1.0f};
VertexShaderConstant[19]={0.5f,0.5f,0.5f,0.5f};
VertexShaderConstant[20]= <vecLight>;
VertexShaderConstant[30]={0.0f,1.0f,0.0f,0.0f};
VertexShaderConstant[31]={1.0f,0.0f,0.0f,0.0f};
VertexShaderConstant[32]={0.0f,0.0f,1.0f,0.0f};
VertexShaderConstant[90]={1.0f,0.0f,0.0f,0.0f}; //damit oFog gefüllt ist
VertexShader = asm
{
vs.1.1
Stream 0;
dcl_Position v0; //Position
dcl_Normal v3; //Normal
dcl_Texcoord0 v7; //Textur Koordinaten 0
//}
//asm
//{
//vs.1.1
m4x4 oPos, v0, c0
m4x4 r10,v0,c4
m3x3 r8,v3,c4
mov oT0, v7
mov oT1, v7
mov oT2, v7
mov oT3, v7
//calculate texture space matrix from normal and up
mul r0,c31,v3.zxyw //-1,0,0
mul r1,c32,v3.yzxw //0,0,-1
sub r0,r1,r0
dp3 r0.w,r0,r0
rsq r0.w,r0.w
mul r0,r0,r0.w //normalized right vector
mov r1, c30 //0,-1,0
mov r2, r8
sub r9,c20,r10
dp3 r9.w,r9,r9
rsq r9.w,r9.w
mul r9,r9,r9.w //normalized light vector
m3x3 r3,r9,r0
mov r3.w,c30.w //transform light to texture space
add r3,r3,c18 //bias
mul r3,r3,c19//scale
mov oD0,r3
mov oFog,c90
};
}
}



Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1