Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,618 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 3 of 5 1 2 3 4 5
Re: pixelshader for overlays without border seams [Re: ventilator] #17237
02/01/04 02:15
02/01/04 02:15
Joined: Jun 2001
Posts: 2,006
USA
Darkstorm Offline
Senior Expert
Darkstorm  Offline
Senior Expert

Joined: Jun 2001
Posts: 2,006
USA
See its a good thing I explained my shortcomings isn't it . Don't worry about the Far Cry shot. I have one set as my wallpaper for inspiration.. and frustration.

@Ventilator - I thought I'd let you know that I have already included you in my "poeple to thank" credits for this project. Heck, I should list you as head programmer .

Re: pixelshader for overlays without border seams [Re: Darkstorm] #17238
02/01/04 02:18
02/01/04 02:18
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
do you model the plants double sided? if you use CullMode=none; this wouldn't be necessary!

Re: pixelshader for overlays without border seams [Re: ventilator] #17239
02/01/04 02:23
02/01/04 02:23
Joined: Jun 2001
Posts: 2,006
USA
Darkstorm Offline
Senior Expert
Darkstorm  Offline
Senior Expert

Joined: Jun 2001
Posts: 2,006
USA
Really? Hmmm I'll have to try that out. Thanks.

I noticed that setting the entities ambient and albedo doesn't seem to work when using this material. Is that right? If so, what do I need to change in the material to adjust these?

Re: pixelshader for overlays without border seams [Re: ventilator] #17240
02/01/04 02:57
02/01/04 02:57
Joined: Feb 2003
Posts: 195
slacker Offline
Member
slacker  Offline
Member

Joined: Feb 2003
Posts: 195
I am having trouble with this one.

here is my code - the objects come out 100% white.

I am running 6.20 commercial with a ti/4200

my object is single sided polys with a texture and alpha.

I am pretty new to this stuff, any help is greatly appreciated.

material mat_overlay

{

effect=

"

texture entskin1;

dword mtlSkill1;

technique vegetation

{

pass p0

{

Texture[0]=<entskin1>;



ZWriteEnable=true;

AlphaTestEnable=true;

AlphaRef=<mtlSkill1>;

AlphaFunc=greater;

//CullMode=none;


ColorArg1[0]=Texture;

ColorOp[0]=Modulate2x;

ColorArg2[0]=Diffuse;

}

}

";

}
starter mat_overlay_init
{

mat_overlay.skill1=pixel_for_vec(vector(127,0,0),0,8888);
}

action matoverlay
{
my.flare = off;
my.transparent = off;
my.material = mat_overlay;
}

p.s. can someone help me get formatted code into these forums?!

Re: pixelshader for overlays without border seams [Re: Darkstorm] #17241
02/01/04 03:06
02/01/04 03:06
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
Quote:

I noticed that setting the entities ambient and albedo doesn't seem to work when using this material. Is that right? If so, what do I need to change in the material to adjust these?


maybe it's necessary to copy the mat_model material parameters to get the same behavior as with standard models. instead of the starter function this example uses a material event function:

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);
}

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

technique vegetation
{
pass p0
{
texture[0]=<entSkin1>;
zWriteEnable=true;
alphaTestEnable=true;
alphaRef=<mtlSkill1>;
alphaFunc=greater;
cullMode=none;

colorArg1[0]=texture;
colorOp[0]=modulate2x;
colorArg2[0]=diffuse;
}
}
technique fallback
{
pass p0
{
}
}
";
}



@slacker: strange! i have no idea what could cause this. i use a gf4 too so this shouldn't be a problem... (try to add an empty fallback! )

Re: pixelshader for overlays without border seams [Re: ventilator] #17242
02/01/04 03:21
02/01/04 03:21
Joined: Jun 2001
Posts: 2,006
USA
Darkstorm Offline
Senior Expert
Darkstorm  Offline
Senior Expert

Joined: Jun 2001
Posts: 2,006
USA
That did the trick. You're getting good at this stuff.

Maybe the all white problem is the same issue?

Re: pixelshader for overlays without border seams [Re: ventilator] #17243
02/01/04 03:24
02/01/04 03:24
Joined: Feb 2003
Posts: 195
slacker Offline
Member
slacker  Offline
Member

Joined: Feb 2003
Posts: 195
that did it! No more z-buffer problems -sweet.

My project owes you a 1000 thanks ventilator, for all of your shader support!

Re: pixelshader for overlays without border seams [Re: slacker] #17244
02/01/04 03:26
02/01/04 03:26
Joined: Jun 2001
Posts: 2,006
USA
Darkstorm Offline
Senior Expert
Darkstorm  Offline
Senior Expert

Joined: Jun 2001
Posts: 2,006
USA
Quote:

My project owes you a 1000 thanks ventilator, for all of your shader support!




I think this is true for quite a few of us. We'll have to find out when that ol birthday is and send a present .

Re: pixelshader for overlays without border seams [Re: Darkstorm] #17245
02/01/04 03:36
02/01/04 03:36
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
you're welcome!

...
was the reason for the white objects the missing empty fallback? there seems to be some kind of strange behaviour with missing empty fallbacks on geforce4 cards! i already reported this on the beta forum but it looked like i was the only one with this problem...

Re: pixelshader for overlays without border seams [Re: ventilator] #17246
02/01/04 16:15
02/01/04 16:15
Joined: May 2002
Posts: 2,541
Berlin
EX Citer Offline
Expert
EX Citer  Offline
Expert

Joined: May 2002
Posts: 2,541
Berlin
Hi all,
If I am not wrong, for backfaces can used the second skin of a model, or?
MfGEX


:L
Page 3 of 5 1 2 3 4 5

Moderated by  Blink, Hummel, Superku 

Gamestudio download | 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