示例#1
0
 static Material GetMaterial(SpoutResources resrc)
 {
     if (_material == null)
     {
         _material           = new Material(resrc.blitShader);
         _material.hideFlags = HideFlags.DontSave;
     }
     return(_material);
 }
示例#2
0
 public static void Blit
     (SpoutResources resrc, CommandBuffer cb, RTID src, RTID dst, bool alpha)
 => cb.Blit(src, dst, GetMaterial(resrc), alpha ? 0 : 1);
示例#3
0
 public static void BlitFromSrgb
     (SpoutResources resrc, Texture src, RenderTexture dst)
 => Graphics.Blit(src, dst, GetMaterial(resrc), 4);
示例#4
0
 public static void BlitVFlip
     (SpoutResources resrc, Texture src, RenderTexture dst, bool alpha)
 => Graphics.Blit(src, dst, GetMaterial(resrc), alpha ? 2 : 3);