protected override void OnUpdateInternal() { coreObject.SetPostEffectCount(postEffects.Count); int count = 0; foreach (var p in postEffects) { coreObject.BeginPostEffect(p.SwigObject); var src_ = coreObject.GetSrcForPostEffect(count); var dst_ = coreObject.GetDstForPostEffect(count); RenderTexture2D src = GC.GenerateRenderTexture2D(src_, GC.GenerationType.Get); RenderTexture2D dst = GC.GenerateRenderTexture2D(dst_, GC.GenerationType.Get); p.OnDraw(dst, src); coreObject.EndPostEffect(p.SwigObject); count++; } }
internal override void OnUpdateInternal() { coreObject.StartAddingPostEffect(postEffects.Count); int count = 0; foreach (var p in postEffects) { coreObject.BeginPostEffect(p.CoreInstance); var src_ = coreObject.GetSrcForPostEffect(count); var dst_ = coreObject.GetDstForPostEffect(count); RenderTexture2D src = GC.GenerateRenderTexture2D(src_, GenerationType.Get); RenderTexture2D dst = GC.GenerateRenderTexture2D(dst_, GenerationType.Get); p.Draw(dst, src); coreObject.EndPostEffect(p.CoreInstance); count++; } }