|
4 registered members (JMMAC, TipmyPip, 2 invisible),
5,269
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
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
Senior Expert
|
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: ventilator]
#17240
02/01/04 02:57
02/01/04 02:57
|
Joined: Feb 2003
Posts: 195
slacker
Member
|
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
OP
Senior Expert
|
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: slacker]
#17244
02/01/04 03:26
02/01/04 03:26
|
Joined: Jun 2001
Posts: 2,006 USA
Darkstorm
Senior Expert
|
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: ventilator]
#17246
02/01/04 16:15
02/01/04 16:15
|
Joined: May 2002
Posts: 2,541 Berlin
EX Citer
Expert
|
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
|
|
|
|