Create a blurred mirror using the reflectlight() function.
A .vfl file that creates an environment blur.
Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Tuesday October 14th, 2008 09:56 PM
#pragma hint refl color
#pragma hint null oppath "obj/null"
#pragma hint null oppath "obj/geo"
#pragma hint map image
#pragma choice type "0" "No Blur"
#pragma choice type "1" "Blur"
#pragma choice type "2" "Environment Map No Blur"
#pragma choice type "3" "Environment Map Blur"
#pragma disable samples type "0"
#pragma disable angle type "0"
#pragma disable samples type "2"
#pragma disable angle type "2"
#pragma disable map type "0"
#pragma disable null type "0"
#pragma disable map type "1"
#pragma disable null type "1"
#pragma group Map map null
#pragma group Blur angle samples
surface
d_mirror
(
string type="0";
vector refl=1;
float bias=.005, angle=0.1;
int samples=16;
string map="",null=""
)
{
vector Nn = normalize(N);
vector In = normalize(I);
if (type=="0") {
Cf = refl * reflectlight(P,Nn,In,bias, max(refl));
} else if (type=="1") {
Cf = refl * reflectlight(P,Nn,In,bias, max(refl),"angle",angle,"samples",samples);
} else if (type=="2") {
Cf = refl * reflectlight(P,Nn,In,bias, max(refl),"environment", map, "envobject", null);
} else {
Cf = refl * reflectlight(P,Nn,In,bias, max(refl),"angle",angle,"samples",samples,"environment", map, "envobject", null);
}
}

Downloads:
Download: env_blur_mirror.vfl 1 KB
Please login or Click Here to register for downloads
Environment Blur Mirror 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
