protected void BlackAndWhiteEffect(ImageEffectArgs args) { RenderTexture temp = RenderTexture.GetTemporary(args.source.width, args.source.height, 0, args.source.format); Graphics.Blit(args.source, temp); Graphics.Blit(temp, args.source, bwMat); RenderTexture.ReleaseTemporary(temp); }
void OnRenderImage(RenderTexture source, RenderTexture destination) { if (world != null && entity != null) { ImageEffectArgs args = new ImageEffectArgs(entity, source, destination); world.eventManager.Raise <ImageEffectArgs>(args); Graphics.Blit(args.source, args.destination); } }