public DistrubutionBsdf(MicrofacetDistribution dist,IFresnelTerm f, RgbSpectrum r0) { //Type = Reflection | Glossy; this.R0 = r0; this.distr = dist; this.fresnel = f; }
public AccumulatedSpectrum Mul(ref SampledSpectrum sp) { if (storeInRgb) { this.rgbAcc *= sp.ToRgb(); } else { this.spAcc *= sp; } return this; }
public AccumulatedSpectrum Mul(ref RgbSpectrum rgb, SpectrumType t) { if (storeInRgb) { this.rgbAcc *= rgb; } else { this.spAcc *= new SampledSpectrum(ref rgb, t); } return this; }
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; }
public DistrubutionBsdf(float e, RgbSpectrum r0) : this(new Blinn(e), new FresnelNoOP(), r0) {}