예제 #1
0
 public DistrubutionBsdf(MicrofacetDistribution dist,IFresnelTerm f, RgbSpectrum r0)
 {
     //Type = Reflection | Glossy;
     this.R0 = r0;
     this.distr = dist;
     this.fresnel = f;
 }
예제 #2
0
 public AccumulatedSpectrum Mul(ref SampledSpectrum sp)
 {
     if (storeInRgb)
     {
         this.rgbAcc *= sp.ToRgb();
     }
     else
     {
         this.spAcc *= sp;
     }
     return this;     
 }
예제 #3
0
        public AccumulatedSpectrum Mul(ref RgbSpectrum rgb, SpectrumType t)
        {
            if (storeInRgb)
            {
                this.rgbAcc *= rgb;
            }
            else
            {
                this.spAcc *= new SampledSpectrum(ref rgb, t);
            }
            return this;

        }
예제 #4
0
 public override void InitPath(PathBuffer buffer) {
     base.InitPath(buffer);
     this.scene = buffer.Scene;
     this.Radiance = new RgbSpectrum(0f);
     this.Throughput = new RgbSpectrum(1f);
     this.PathState = PathTracerPathState.EyeVertex;
     this.Sample = buffer.Sampler.GetSample();
     this.PathRay = new RayData ( scene.Camera.GetRay(Sample.imageX, Sample.imageY));
     this.RayIndex = -1;
     this.pathWeight = 1.0f;
     this.tracedShadowRayCount = 0;
     this.depth = 0;
     this.specularBounce = true;
 }
예제 #5
0
 public DistrubutionBsdf(float e, RgbSpectrum r0) : this(new Blinn(e), new FresnelNoOP(), r0) {}