Shader on View entity

Posted By: Edgecrusher

Shader on View entity - 08/20/06 19:41

Hi.

One question. Is it possible to apply a shader on a view entity, and if, then how? I've tried, I use the Specular and normalmapping shader from AUM54 I think. I included specular.wdl in my main file, everything works fine, but when I add the line material = mat_specular in the section for the entity, nothing happens. Then I wanted to add 'tangent' to the flags section, I get the error that tangent is an Invalid flag name. And yes, I copied most of the function from the .wdl inside the script where the view entity is, and I've used the wiki und search function, but found nothing. Thanks in advance.
Posted By: mk_1

Re: Shader on View entity - 08/20/06 20:08

Dunno what you did but it is certainly possible.
Posted By: Edgecrusher

Re: Shader on View entity - 08/20/06 20:18

But how? I'll post the code here

material mat_normalmap
{
flags=tangent;
}

starter init_spec()
{
sleep (3); // wait until the level is loaded
effect_load(mat_normalmap, "normalmap.fx");
mat_normalmap.skill1=float(sun_pos.x);
mat_normalmap.skill2=float(sun_pos.z);
mat_normalmap.skill3=float(sun_pos.y);
}


Entity XM8()
{
type = <xm8.mdl>;
view = camera;
flags=visible,overlay;
material = mat_normalmap;
x = 14;
y = -5.5;
z = -4.5;
scale_x = 2;
scale_y = 2;
scale_z = 2;
pan = 6;
tilt = 5;
roll = 1;
}

Thats all of the relevant code I guess
© 2023 lite-C Forums