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_fakesky.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
|
354 b
|
14 lines
/*
* fakesky.sl
*
* Shader a la const that slaps a fixed blue color up on the top half of a
* sphere, with color varying a bit by altitude, in an attempt to mimic the
* clear sky.
*/
surface k3d_fakesky(vector up = (0,0,1); color skycolor = (.5, .6, 1.)) {
Oi = Os;
Ci = Os * (.5 + .5 * max(0., (up . normalize(N)))) * 1.8 * skycolor;
}