Exemple #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="p"></param>
        /// <param name="pEpsilon"></param>
        /// <param name="lmax"></param>
        /// <param name="scene"></param>
        /// <param name="computeLightVisibility"></param>
        /// <param name="time"></param>
        /// <param name="coeffs"></param>
        public virtual void SHProject(Point p, double pEpsilon, int lmax, Scene scene, bool computeLightVisibility, double time, Spectrum[] coeffs)
        {
            for (var i = 0; i < Sh.SHTerms (lmax); ++i)
                coeffs[i] = new Spectrum ();
            var ns = Util.RoundUpPow2 (this.NumberOfSamples);
            var scramble1D = Api.Random.Next ();
            var scramble2D = new int[] { Api.Random.Next (), Api.Random.Next () };
            var Ylm = new double[Sh.SHTerms (lmax)];

            for (var i = 0; i < ns; ++i)
            {
                var u = new double[2];
                var pdf = 0.0;
                var lightSample = new LightSample (u[0], u[1], MonteCarlo.VanDerCorput (i, scramble1D));
            }
        }
Exemple #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="p"></param>
 /// <param name="pEpsilon"></param>
 /// <param name="ls"></param>
 /// <param name="time"></param>
 /// <param name="wi"></param>
 /// <param name="pdf"></param>
 /// <param name="vis"></param>
 /// <returns></returns>
 public abstract Task<Spectrum> SampleLAsync(Point p, double pEpsilon, LightSample ls, double time, Vector wi, out double pdf, VisibilityTester vis);
Exemple #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="scene"></param>
 /// <param name="ls"></param>
 /// <param name="u1"></param>
 /// <param name="u2"></param>
 /// <param name="time"></param>
 /// <param name="ray"></param>
 /// <param name="Ns"></param>
 /// <param name="pdf"></param>
 /// <returns></returns>
 public abstract Task<Spectrum> SampleLAsync(Scene scene, LightSample ls, double u1, double u2, double time, Ray ray, Normal Ns, out double pdf);
Exemple #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="scene"></param>
 /// <param name="ls"></param>
 /// <param name="u1"></param>
 /// <param name="u2"></param>
 /// <param name="time"></param>
 /// <param name="ray"></param>
 /// <param name="Ns"></param>
 /// <param name="pdf"></param>
 /// <returns></returns>
 public abstract Spectrum SampleL(Scene scene, LightSample ls, double u1, double u2, double time, Ray ray, Normal Ns, out double pdf);