/* A simple surface shader to compute occlusion (a.k.a geometric exposure) using a point cloud file. This shader was created by 3Delight Team and modified by Jorge Pimentel(www.jorgepimentel.com), in order to have more control over the occlusion shadeop. */ surface ptc_occlusion( string ptc_file = "default.ptc"; float biasValue = 0.1; float clampValue = 0; string hitsidesValue = "both"; float samplebaseValue = 1; float maxdistValue = 0; float maxsolidangleValue = 0.5; ) { normal Nf = faceforward( normalize(N), I ); Ci = 1 - occlusion( P, Nf, "filename", ptc_file, "pointbased", 1, "bias", biasValue, "clamp", clampValue, "hitsides", "both", "samplebase", 1 , "maxdist", maxdistValue, "maxsolidangle", maxsolidangleValue ); }