Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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);
     }
 }