Using the reflectlight() function in VEX.
Create a mirror surface.
Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Thursday July 31st, 2008 10:09 PM

#pragma hint refl color
#pragma hint blur toggle
#pragma disable samples blur 0
#pragma disable angle blur 0
surface
d_mirror(vector refl=1; float bias=.005, angle=0.1; int samples=16, blur=0)
{
vector Nn = normalize(N);
vector In = normalize(I);
if (!blur) {
Cf = refl * reflectlight(P,Nn,In,bias, max(refl));
} else {
Cf = refl * reflectlight(P,Nn,In,bias, max(refl),"angle",angle,"samples",samples);
}
}
Downloads:
Download: reflect_light.vfl 462 B
Please login or Click Here to register for downloads
Reflect Light by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
