Esempio n. 1
0
        public Material(
            ColorProbability diffuseProbabilities,
            ColorProbability specularProbabilities,
            ColorProbability refractiveProbabilities,
            Probability diffuseReflectionProbability,
            Probability specularReflectionProbability,
            Probability refractionProbability,

            BRDF brdf,
            Light emmissiveLight,
            RefractiveIndex refractiveIndex
            )
        {
            DiffuseProbabilities    = diffuseProbabilities;
            SpecularProbabilities   = specularProbabilities;
            RefractiveProbabilities = refractiveProbabilities;

            DiffuseReflectionProbability  = diffuseReflectionProbability;
            SpecularReflectionProbability = specularReflectionProbability;
            RefractionProbability         = refractionProbability;

            BRDF            = brdf;
            EmmissiveLight  = emmissiveLight;
            RefractiveIndex = refractiveIndex;
        }
Esempio n. 2
0
 static BRDF Mixture(BRDF f1, BRDF f2, float alpha)
 {
     return((N, Lin, Lout) => lerp(f1(N, Lin, Lout), f2(N, Lin, Lout), alpha));
 }