protected void SplatFiltered(SampleBufferElem sampleElem) { var dx = (sampleElem.screenX + 0.5f); var dy = (sampleElem.screenY + 0.5f); var fLUT = this.filterLUTs.GetLUT(dx - (float)Math.Floor(sampleElem.screenX), dy - (float)Math.Floor(sampleElem.screenY)); var lut = fLUT.GetLUT(); int x0 = MathLab.Ceil2UInt(dx - this.filter.xWidth); int x1 = x0 + fLUT.GetWidth(); int y0 = MathLab.Ceil2UInt(dy - this.filter.yWidth); int y1 = y0 + fLUT.GetHeight(); int lutOffset = 0; for (int iy = y0; iy < y1; ++iy) { if (iy < 0) { lutOffset += fLUT.GetWidth(); continue; } else if (iy >= (this.Height)) break; for (int ix = x0; ix < x1; ++ix) { float filterWt = lut[lutOffset++]; if ((ix < 0) || (ix >= (this.Width))) continue; this.SplatRadiance(ref sampleElem.radiance, ix, iy, filterWt); } } }
public virtual void SplatPath(PathSampler path, out SampleBufferElem[] radianceEstimate) { radianceEstimate = new SampleBufferElem[1]; }