pointbasedenvcolor.sl

[index]

10th February 2009   9:50pm 38sec
/home/cleong20/Desktop/vsfx419/shaders/pointbasedenvcolor.sl


pt_envOcc



#include "normals.h"
  
    surface 
    pointbasedenvcolor (string filename = "";
                        string hitsides = "both";
                        float maxdist = 1e15, falloff = 0, falloffmode = 0;
                        float samplebase = 0, bias = 0.01;
                        float clampocclusion = 1;
                        float maxsolidangle = 0.05, maxvariation = 0;
                        string envmap = "" ) 
    {
        normal Ns = shadingnormal(N);        
        color envcol = 0;
        vector envdir = 0;
        float occ;
  
        occ = occlusion(P, Ns, 0, "pointbased", 1, "filename", filename,
                        "hitsides", hitsides,
                        "maxdist", maxdist, "falloff", falloff,
                "falloffmode", falloffmode,
                        "samplebase", samplebase, "bias", bias,
                        "clamp", clampocclusion,
                        "maxsolidangle", maxsolidangle,
                        "maxvariation", maxvariation,
                "environmentmap", envmap,
                        "environmentcolor", envcol,
                        "environmentdir", envdir
                       );
  
        Ci = envcol;
        Oi = Os;
    }