Ati's Fur Shader!!

Posted By: M3PHiSTOPH3L3S

Ati's Fur Shader!! - 02/03/04 06:37

Yay!! My first shader conversion!! Anyways it doesnt look just like ati's demo but that is probably due to the texture. I got the screenshot and script file on my home page here. All you have to do is add the script to your project and assign the atifur action to a model that has skin as well as alpha channel. I used noise for the skin and alpha channel and it yielded decent results. Oh and also this uses vs1.1 and ps1.4. I tested it on a GeForceFX. And as I dont make shaders so it proably has extra bloat to the script, well anyways enjoy .

M3PHiSTO
Posted By: fuxerz

Re: Ati's Fur Shader!! - 02/03/04 08:58

hey thanks for converting this gr8 shader
did you notice that it can be used as a glow shader too?i got some nice results on ghost models.Well done!
Posted By: Drew

Re: Ati's Fur Shader!! - 02/03/04 08:59

YESSS!!!!!!!!!
My hereo! I've been dying for a fur shader!
I cant wait to get home tonight to try it...
I REALLY appreciate any shader donations!
Thank you.


Posted By: Drew

Re: Ati's Fur Shader!! - 02/03/04 15:35

Works great!! Texture is a 32bit TGA...The texture is white noise, with a duplicate as its alpha channel...
the larger the pixels the fatter the fur, since you get shading between...VERY COOL STUFF
Posted By: ello

Re: Ati's Fur Shader!! - 02/03/04 17:28

wow, great - for both of your shaders!
and thanks for the comments in the shader. it helps learning much.
keep it going.
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/03/04 22:13

thanks for sharing! ...where did you find the source of the fur shader? i didn't notice this anywhere...

i will try to make it pixel shader 1.1 compatible!
Posted By: M3PHiSTOPH3L3S

Re: Ati's Fur Shader!! - 02/03/04 23:13

Thank you all! This shader is, as far as I can tell, exactly like the ati code dirrectly from rendermonkey. The only thing I've changed(besides the action and the way its setup) is the texture, so if you had a similar texture as the ati sample it shoud look fairly identical. Its strange really, I didn't really think that it would be that compatable, but no complaints here . And yes I'm going to be continuing converting em too. My next projects are npr,npr mettalic, and metal. Thank you again.

M3PHiSTO
Posted By: ello

Re: Ati's Fur Shader!! - 02/03/04 23:36

and if you have the time , i'd like to ask you if you could try some hatching shader. i couldnt get it to work...
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 00:09

my first fur shader try:

it's very slow but it looks nice... i use 2 separate textures. the noise map can be scaled this way...

@ello: i had a working cross hatching shader but i lost it in the chaos on my harddrives. maybe i will find it again...
Posted By: ello

Re: Ati's Fur Shader!! - 02/04/04 00:37

that would be amazing. but why didnt you post it?
to your fur-shader example: this really kicks ass. how bad is the framerate drop?
Posted By: M3PHiSTOPH3L3S

Re: Ati's Fur Shader!! - 02/04/04 00:41

wow that looks cool!!

@ventilator: if you look at the code you will see that you can comment out some of the passes such as anywhere from p4-p12 to p13 which are just pixel shaders(very repetative ones I might add). This will make the effect less furry however, but should help speed. I'm sure you should be able to use a count or something instead of 13 identical passes with the only difference being the shader number =/. I just got a headache thinking about that one...

M3PHiSTO

PS getting ready to test out the hatching shader .
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 00:54

the bad performance gets caused by the overdraw. i use 12 shells and when the camera gets very near and the entity fills the entire screen it stresses the pixel fill rate so much that the fps go down to 20 on my gf4. if the entity is in some distance the performance is ok.

...
i didn't post it because i lost it before i did the last refinements...
Posted By: M3PHiSTOPH3L3S

Re: Ati's Fur Shader!! - 02/04/04 01:43

argh i cant get the hatching shader to work yet. I keep getting syntax errors in the material. BTW for the hatching shader shouldnt it be possible to use 3 textures instead of 6 with some conversion? Well looking over shaders for errors is giving me a headache so I'm taking a break.

@ventilator: If you would like to see my conversion maybe you could fix it. Just let me know and I can E-Mail you it.

M3PHiSTO
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 02:23

i added my fur shader version to my wiki... i hope it works because i made some last minute changes without testing it!
Posted By: ello

Re: Ati's Fur Shader!! - 02/04/04 04:42

wow, now after i applied this onto a model which has transparent and brightflare and a u/v shifting. this is abolute powerfull. u can use it for suns corona, or absolute amazing fire effects. and even fake some nice water caustics with it.
Posted By: Drew

Re: Ati's Fur Shader!! - 02/04/04 05:26

ventilator-
I added the code, strange...my A6 crashes out at the beginning of startup...then just closes and goes nowhere...
The standard white box...
only hapens when I have the fur code...I have a radeon 9600 , do I know its compatible...anyone else get this?

Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 05:42

it should work. maybe i made a typo somewhere on the wiki. does it work for anybody else?
Posted By: myrlyn68

Re: Ati's Fur Shader!! - 02/04/04 05:44

Works fine with ATI 9000 Pro, ATI 9800 Pro and ATI Fire Fire GL 9800.

Seems a bit slow on the 9000, but the others like it just fine.
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 05:49

a problem (besides the performance on older cards) is that there is no way to assign materials to infividual parts of a model. the furry characters running around in my levels look a bit strange with fur on the face and everywhere else!
Posted By: fuxerz

Re: Ati's Fur Shader!! - 02/04/04 06:01

it does work on individual body parts
Posted By: EX Citer

Re: Ati's Fur Shader!! - 02/04/04 06:05

Hiho, pretty nice shader! It is exactly what I need for Dangerous Vaults2 *lol* and Triablo... and, and, and, I just hope I get how to fine adjust something for frame rates in this shader (I really do not know much about the shader syntax, but I am trying ).

@ Ventilator: You have to use shaders on lifeforms as clothes. For example, Tara is a model out of four models: body, eyes, trouser, latexsuit, boots and hair. The clothes are made with milkshapes FATBOY TOOL.
The same I have to do for the gorillas, tigers, leopards and and and. The suit is there where the fur will be. Thanks to the bones ANIMATION which makes it easily possible to wrap models artound models (with animation) (it was hard work ind angerous vaults 1 to synchronisize Tara, Enemies and clothes for the animations).
MfG EX

Oha! I forgot to explain whats up with the fatboy tool: You have your finished bodymodel first. MAke a security copy, because it may happen that you overwrite ist accidentially...
Open the copy, delete head and legs and arms... and you got your suit. Now open it in milkshape (if you create bones in milkshape, your skin will be lost) and use the fatboy tool on the model. Then wit will be a bit bigger as the body. This is not the same as scaling... fatboy tool moves every vertice in its normal direction. Scaling just moves vertices out of the center!
Posted By: Drew

Re: Ati's Fur Shader!! - 02/04/04 07:56

yeah, I tried it all. Its not a model thing, since it still crashes on compile without any objects. I removed any and all other shaders... oh well..
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 08:13

i know that there are several workarounds to use materials on individual parts but nevertheless the possibility to assign multiple materials to a model would be very helpful...

...
btw. i added a hatching shader conversion to my wiki.

@drew: maybe you can publish the project and try it on a different computer to find out if it's a driver problem or something like that...
Posted By: Drew

Re: Ati's Fur Shader!! - 02/04/04 09:59

good idea! wow...no shaders for a while, then BAM!!!
thanks
Is this what you mean by Hatching shader? (ATI demo)
Also, can you explain how to put the images in RGB?
(Dont mean to hijack the thread..you should open another just for hatching). Again, Thanks for all and any shaders!!


Posted By: ventilator

Re: Ati's Fur Shader!! - 02/04/04 10:20

yes, but the example i converted isn't so sophisticated. it doesn't have shadows, outlines and colors. outlines and colors would be easy to add though. for outlines the shell method of the fur shader could be used.

you could simply draw into the individual color channels in your image editing program!
Posted By: EX Citer

Re: Ati's Fur Shader!! - 02/04/04 16:16

Well, with my method you are able to add many materials to one model. FOr example, in triablo, there will be monster with an metall armor (metal shadered), with leather parts (bumpmapped(?)) and fur on skin parts (werewolves or something). Or tara: the suit (enviroment map shader), trousers (bumpmap shader(?)). It is not 100% the same as ONE model, but it looks like Even if there would be no shaders, I would do the same, so it doesn´t matter to me. I even done that in DV1...

MfG EX
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/05/04 09:26

@drew: try to run the fur shader with the latest beta. i found out that it doesn't work for me with 6.20.2 either. strange... maybe it helps!
Posted By: M3PHiSTOPH3L3S

Re: Ati's Fur Shader!! - 02/05/04 09:58

I believe that I'm actually using 6.20.2 and it works, but I'm also using a GeForceFX. Not ATI.

M3PHiSTO
Posted By: ello

Re: Ati's Fur Shader!! - 02/05/04 16:33

i have no problems, and a good framerate. but i have a radeon 9600pro
Posted By: Drew

Re: Ati's Fur Shader!! - 02/05/04 16:57

I got it! my mistake...sorry
My TGA was greyscale for somereason...I fixed it by adding my alpha channel and saving it as 32bit...

sweetness.
Posted By: ventilator

Re: Ati's Fur Shader!! - 02/05/04 21:37

my problem with 6.20.2 was this one. and for 6.20.2 i had to use my.transparent=on; for the entity to get it to work. strange! with the latest beta it worked without my.transparency=on; ...
Posted By: Drew

Re: Ati's Fur Shader!! - 02/06/04 20:53

Check it out! using the fur shader as grass on terrain...
I would have a demo here, but my published version crashes. I get an error that a 'block' symbol exists...(the block is the same as a blank space)... anyone else get this error publishing with A6?


Posted By: ventilator

Re: Ati's Fur Shader!! - 02/06/04 21:08

there seems to be a bug with extremely long shaders like the fur shader. they have to be put into a .fx file. publishing should work then!

nice screenshot!
Posted By: ello

Re: Ati's Fur Shader!! - 02/06/04 21:48

fps? with such a big surface
Posted By: Rhuarc

Re: Ati's Fur Shader!! - 02/07/04 01:28

This is a great shader, but keep in mind that it is VERY slow on pcs not up to par. I get about 30fps on a dual P4 2.4 system with a Radeon video card- and only rendering a block with a strawlike fur (like in the dX example).

-Rhuarc
Posted By: Drew

Re: Ati's Fur Shader!! - 02/07/04 01:51

around 30fps on radeon 9600... i'll have a demo later tonight..
Posted By: Drew

Re: Ati's Fur Shader!! - 02/07/04 06:10

@Ventilator-
What is the code for loading .fx again?
Can't find my example...
Thanks!
Posted By: Steempipe

Re: Ati's Fur Shader!! - 02/07/04 07:16

Awesome job and great screenshot!!!
Posted By: qwerty823

Re: Ati's Fur Shader!! - 02/07/04 08:08

@Drew, I answered that question in another thread, but here it is again.

effect_load(material,string name)

Loads an effect file in Microsoft .fx format from the work folder into the given material, and applies to effect to all models and terrain that have this material assigned. This instruction can be used to edit effects and shaders in real time and observe the result immediately in the game.


Posted By: Drew

Re: Ati's Fur Shader!! - 02/07/04 08:27

thanks

man, they dont give specifics in their 'anti-codenewbie' manuals...
I understand the concept and code, where does it go?
Where and how do I define the .fx?
Im lost...

Posted By: Drew

Re: Ati's Fur Shader!! - 02/07/04 15:28


I've posted a small demo here:
http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Number=344281&page=0&view=collapsed&sb=5&o=&fpart=&vc=1&PHPSESSID=



Posted By: Coronis_Eposivia

Re: Ati's Fur Shader!! - 12/13/04 00:08

are shaders workin with a geforce4 mx 4000? because non of the shaders are working??
Posted By: blaaaaa

Re: Ati's Fur Shader!! - 12/13/04 00:26

no they are not
Posted By: Coronis_Eposivia

Re: Ati's Fur Shader!! - 12/13/04 02:47

srry I ment geforce 4..
Posted By: M3PHiSTOPH3L3S

Re: Ati's Fur Shader!! - 12/13/04 03:54

I have a geForceFX, but as far as I know GF4 support shaders also. I'm not sure of what versions it supports however. I think the problem you are experiencing is that you are using the Directx 8 version of these shaders. As of version 6.31 we now have a directx 9c interface in A6, and the shader needs to be setup slightly different. There is info on this in the update readme. Hope that helps, if not, I dunno...

EDIT:
occording to the wiki, the GF4MX does not support shaders. Only the GO and TI models support them, and even with those cards you can only use vs1.1 and ps1.3. Funny, I thought all GF4 supported shaders.



M3PHiSTO
Posted By: Drew

Re: Ati's Fur Shader!! - 02/09/05 08:47

Can we get this shader caught up to dx9 and 63.14?
Im sure allot fo us could use it, and sorry I dont have the know-how to do it myself...

thanks in advance!!!!!
Drew
Posted By: htwarrior

Re: Ati's Fur Shader!! - 12/02/05 19:38

Hi, I tried to use your shader but a message appears:

Malfunction W1550

Error in effect

mat_fur(16): error x3000: syntax error: unexpected token 'f'


My vertex shader is 2.0 and my pixel Shader is 2.0

I would like to try it.

HtWarrior
Posted By: oldschoolj

Re: Ati's Fur Shader!! - 01/23/06 07:22

I mus tbe doing something wrong, cuz everytime i try to run it I get an error message: Flag unknown tangent

< effect "

matrix matWorldViewProj;
matrix matWorld;
matrix matWorldV>

Keyword unkown Mat_Fur effect

Anyone have suggestions?
Posted By: zefor

Re: Ati's Fur Shader!! - 01/23/06 17:49

Give this a try all.
NOTE: If you want better looking fur, change this line
VertexShaderConstant[4]={0.24f,0.24f,0.24f,0.24f};
to
VertexShaderConstant[4]={0.76f,0.76f,0.76f,0.76f};
There are 14 of these lines to change. In my opinion, it looks alot more like the fur shown in rendermonkey. I will post the "changed" code in the shader index. Remember to put a check in the "nofog" box of your model or it will be black.

Code:

material mat_fur
{
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]={1.0f,1.0f,1.0f,1.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={2.0f,2.0f,2.0f,2.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={3.0f,3.0f,3.0f,3.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={4.0f,4.0f,4.0f,4.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={5.0f,5.0f,5.0f,5.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={6.0f,6.0f,6.0f,6.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={7.0f,7.0f,7.0f,7.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={8.0f,8.0f,8.0f,8.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={9.0f,9.0f,9.0f,9.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={10.0f,10.0f,10.0f,10.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={11.0f,11.0f,11.0f,11.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={12.0f,12.0f,12.0f,12.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={13.0f,13.0f,13.0f,13.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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]={14.0f,14.0f,14.0f,14.0f};

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

VertexShader =
asm{

vs.1.1

dcl_position v0
dcl_normal v1
dcl_texcoord v2
// 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=mat_fur;
}


Posted By: Aram

Re: Ati's Fur Shader!! - 01/31/06 00:25

My latop is GeForce 4 GO MX 440 and I already sent the post to graphic card info post which shows it does not have pixel or vertex shader at all!
© 2024 lite-C Forums