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_outline.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
|
283 b
|
16 lines
/* IDoutline written by Ivan DeWolf
* it's the valdez algorithm. short and sweet.
* width sets the line width.
*/
surface
k3d_outline(float width = .05)
{
normal Nn = normalize (-N);
float dot = Nn . normalize(I);
P += Nn*width;
Ci = 0;
Oi = smoothstep(-.01,0,dot);
}