Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (Martin_HH, steyr, alibaba), 509 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
shaders? #53075
08/22/05 22:49
08/22/05 22:49
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
Is there a kind of Newbie's tutorial about shader, what is shaders, how we use them, etc. ?


Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: shaders? [Re: Marky Mark] #53076
08/22/05 22:53
08/22/05 22:53
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany

Re: shaders? [Re: Pappenheimer] #53077
08/23/05 03:56
08/23/05 03:56
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
Thanks a lot! very usefull!


Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: shaders? [Re: Marky Mark] #53078
08/27/05 16:44
08/27/05 16:44
Joined: Aug 2005
Posts: 107
NMS Offline
Member
NMS  Offline
Member

Joined: Aug 2005
Posts: 107
Hi cant access it!

What should i put in the name and the password??


EDIT: lol... nevermind :P

Last edited by NMS; 08/27/05 16:47.

http://www.coniserver.net/ubbthreads/showflat.php?Cat=0&Number=560847&an=0&page=0#560847 Cmon every one! Help me building this camera script! The first of its kind in 3dgs! Thnkx to everyone who helped me in my questions
Re: shaders? [Re: NMS] #53079
08/28/05 06:04
08/28/05 06:04
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
loll we call this fast clicking


Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: shaders? [Re: Marky Mark] #53080
08/28/05 11:08
08/28/05 11:08
Joined: Aug 2005
Posts: 107
NMS Offline
Member
NMS  Offline
Member

Joined: Aug 2005
Posts: 107
lol, yes it was a supersonic clicking...


http://www.coniserver.net/ubbthreads/showflat.php?Cat=0&Number=560847&an=0&page=0#560847 Cmon every one! Help me building this camera script! The first of its kind in 3dgs! Thnkx to everyone who helped me in my questions
Re: shaders? [Re: NMS] #53081
08/29/05 02:49
08/29/05 02:49
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
Can we use shaders with our level blocks?


Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: shaders? [Re: Marky Mark] #53082
08/29/05 04:22
08/29/05 04:22
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

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

Can we use shaders with our level blocks?




Yes.

var d3d_automaterial = 1;

Name the WED texture the name of your material.
You may have to make some changes to your shader as well.
Please usethe search feature next time.
It's there for a reason.

Re: shaders? [Re: Josh_Arldt] #53083
08/29/05 20:20
08/29/05 20:20
Joined: Jul 2002
Posts: 857
Québec
Marky Mark Offline OP
User
Marky Mark  Offline OP
User

Joined: Jul 2002
Posts: 857
Québec
I put the var d3d_automaterial = 1; in my script, and named the material grass01, like my texture on one of my wads. I'm using the ati fur shader:

======

var d3d_automaterial = 1;


material grass01
{
flags = tangent;

effect
"
matrix matWorldViewProj;
matrix matWorld;
matrix matWorldView;

texture entSkin1;

technique fur
{
pass p0
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={1f,1f,1f,1f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
pixelshader=
asm
{
ps.1.4

texld r0, t0 // base map

mul r0, r0, c0
};
}
pass p1
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={2f,2f,2f,2f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};

}
pass p2
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={3f,3f,3f,3f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p3
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={4f,4f,4f,4f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}

pass p4
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={5f,5f,5f,5f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p5
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={6f,6f,6f,6f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p6
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={7f,7f,7f,7f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p7
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={8f,8f,8f,8f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p8
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={9f,9f,9f,9f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p9
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={10f,10f,10f,10f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p10
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={11f,11f,11f,11f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p11
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={12f,12f,12f,12f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p12
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={13f,13f,13f,13f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
pass p13
{
Texture[0] = <entSkin1>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
VertexShaderConstant[5]={14f,14f,14f,14f};

PixelShaderConstant[0]={0.628f,0.373f,0.121f,0.424f};

VertexShader =
decl
{
stream 0;
float v0[3]; //Position
float v1[3]; //Normal
float v2[3]; //Texture Coordinates
}
asm
{
vs.1.1
// get model space vertex
mov r0, v0

// get shell distance
mov r1, c4

// offset shell in direction of normal
mul r1.x, r1.x, c5.x
mul r1.xyz, r1.xxx, v1.xyz
add r0.xyz, r0.xyz, r1.xyz

// output transformed vertex
m4x4 oPos, r0, c0

// output texture coordinates
mov oT0, v2
};
}
}
";
}

ACTION atifur
{
my.material=grass01;
}


Yeah! IE sucks, use Mozilla...
Marc Rémillard.
Re: shaders? [Re: Marky Mark] #53084
08/29/05 20:58
08/29/05 20:58
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
That shader is for DX8 and not DX9.
It will require a few changes to even work...
Not sure how well this will work on geometry...
It's probably not a good idea.

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