public override void Render( Surface src, Surface dest, Rectangle[] rois, int startIndex, int length) { unsafe { BlurRenderer.Render(src, dest, rois, startIndex, length); //**** // have to do adjustment in place, hence dstArgs for both 'args' parameters BrightnessAndContrastRenderer.Render(dest, dest, rois, startIndex, length); for (int i = startIndex; i < startIndex + length; ++i) { Rectangle roi = rois[i]; for (int y = roi.Top; y < roi.Bottom; ++y) { ColorBgra *dstPtr = dest.GetPointAddressUnchecked(roi.Left, y); ColorBgra *srcPtr = src.GetPointAddressUnchecked(roi.Left, y); _screenBlendOp.Apply(dstPtr, srcPtr, dstPtr, roi.Width); } } } }
void Start() { BR = BlurRenderer.instance; BR.RenderBlur(MaxBlur.value, (int)Quality.value, 1, (int)DownRes.value, true); }
void Start() { BRM = BlurRenderer.Create(); }