home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hackers Magazine 57
/
CdHackersMagazineNr57.iso
/
Software
/
Multimedia
/
k3d-setup-0.7.11.0.exe
/
share
/
k3d
/
shaders
/
surface
/
k3d_fill.sl
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
2008-01-23
|
317 b
|
15 lines
/*IDfill written by Ivan DeWolf
*simple toon fill shader with shadows
*compare this to plastic.sl
*/
surface
k3d_fill(
float Kd = 1,
Ka = .7,
min = 0.05,
max = 0.055)
{
normal Nf = faceforward(normalize(N), I );
Ci = Cs * (Ka*ambient() + Kd*(smoothstep(min,max,comp(diffuse(Nf),0))));
}