|
surface
pointbasedreflectionocclusion
(string filename = "";
string hitsides = "both";
string distribution = "cosine";
float clamp = 1;
float maxdist = 1e15, falloff = 0, falloffmode = 0;
float coneangle = 0.2;
float maxsolidangle = 0.01;
float samplebase = 0.0;
float bias = 0.0001; )
{
normal Nn = normalize(N);
vector refl = reflect(I, Nn);
float occ;
occ = occlusion(P, refl, 0, "pointbased", 1, "filename", filename,
"hitsides", hitsides, "distribution", distribution,
"clamp", clamp,
"maxdist", maxdist, "falloff", falloff,
"falloffmode", falloffmode,
"coneangle", coneangle,
"maxsolidangle", maxsolidangle,
"samplebase", samplebase, "bias", bias);
Ci = 1 - occ;
Ci *= Os;
Oi = Os;
}
|