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; }
public static Material CreateRefractive( ColorProbability specularProbabilities, ColorProbability refractiveProbabilities, RefractiveIndex refractiveIndex ) { var sr = specularProbabilities.Red; var sg = specularProbabilities.Green; var sb = specularProbabilities.Blue; var rr = refractiveProbabilities.Red; var rg = refractiveProbabilities.Green; var rb = refractiveProbabilities.Blue; var pReflect = ColorProbability.MaxOfAdditions(specularProbabilities, refractiveProbabilities); var pRefract = ColorProbability.ProportionOfAdditions(specularProbabilities, refractiveProbabilities); return(new Material( ColorProbability.Zero, specularProbabilities, refractiveProbabilities, Probability.Zero, pReflect, pRefract, PhongBRDF(ColorProbability.Zero, specularProbabilities), Light.None, refractiveIndex )); }