Esempio n. 1
0
        public float GeoTerms(ref ShadeRec sr)
        {
            float NDotD = (float)-SampleNormal.DotProduct(Wi);
            float d2    = (float)Math.Pow((SamplePoint - sr.HitPoint).Length, 2);

            return(NDotD / d2);
        }
Esempio n. 2
0
        public Vector3D L(ref ShadeRec sr)
        {
            float NDotD = (float)-SampleNormal.DotProduct(Wi);

            if (NDotD > 0.0f)
            {
                return(GeoObj.Material.Le(ref sr));
            }
            else
            {
                return(PreDefColor.BlackColor);
            }
        }