Gamestudio Links
Zorro Links
Newest Posts
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
3 registered members (AndrewAMD, degenerate_762, ozgur), 1,311 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Vertex shader question [Re: Rigoletto] #56691
10/05/05 18:50
10/05/05 18:50
Joined: Mar 2005
Posts: 80
S
SirSven Offline OP
Junior Member
SirSven  Offline OP
Junior Member
S

Joined: Mar 2005
Posts: 80
Maybe it is possible to go around the z-sorting errors with this code from the wiki?

Code:
function mtl_vegetation_init
{
vec_set(mtl.emissive_blue,mat_model.emissive_blue);
vec_set(mtl.ambient_blue,mat_model.ambient_blue);
vec_set(mtl.diffuse_blue,mat_model.diffuse_blue);
vec_set(mtl.specular_blue,mat_model.specular_blue);
mtl.power=mat_model.power;
mtl.albedo=mat_model.albedo;
mtl.skill1=pixel_for_vec(vector(128,0,0),0,8888); // the first value in the vector is the threshold
}

material mtl_vegetation
{
event=mtl_vegetation_init;
effect=
"
texture entSkin1;
dword mtlSkill1;

technique vegetation
{
pass p0
{
Texture[0]=<entSkin1>;
ZWriteEnable=True;
AlphaBlendEnable=False;
AlphaTestEnable=True;
AlphaRef=<mtlSkill1>;
AlphaFunc=Greater;
CullMode=CCW; // CCW or None

ColorArg1[0]=Texture;
ColorOp[0]=Modulate2X;
ColorArg2[0]=Diffuse;
}
}
technique fallback{pass p0{}}
";
}

action vegetation
{
my.transparent=off;
my.flare=off;
my.material=mtl_vegetation;
}



Last edited by SirSven; 10/05/05 18:51.
Re: Vertex shader question [Re: SirSven] #56692
10/06/05 11:12
10/06/05 11:12
Joined: May 2003
Posts: 609
Rattenfängerstadt
Rigoletto Offline
Developer
Rigoletto  Offline
Developer

Joined: May 2003
Posts: 609
Rattenfängerstadt
No, this won´t work, cause there are no values to sort if they are on one plane.

Re: Vertex shader question [Re: SirSven] #56693
10/06/05 18:19
10/06/05 18:19
Joined: Aug 2002
Posts: 44
Panama City, FL
S
Specterdragon Offline
Newbie
Specterdragon  Offline
Newbie
S

Joined: Aug 2002
Posts: 44
Panama City, FL
Quote:

Now it works without errors, but I just see a black object!




It could be the fog setting for the pass. I forget the exact command off the top of my head (at work, no code to review). Someone want to help on this? fogenable=false ?? or is it enablefog=false ?? (which goes in the "pass" section of the shader.


Just thinking out loud, Specterdragon
Page 2 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