Esempio n. 1
0
 static Material GetMaterial(SpoutResources resrc)
 {
     if (_material == null)
     {
         _material           = new Material(resrc.blitShader);
         _material.hideFlags = HideFlags.DontSave;
     }
     return(_material);
 }
Esempio n. 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);
Esempio n. 3
0
 public static void BlitFromSrgb
     (SpoutResources resrc, Texture src, RenderTexture dst)
 => Graphics.Blit(src, dst, GetMaterial(resrc), 4);
Esempio n. 4
0
 public static void BlitVFlip
     (SpoutResources resrc, Texture src, RenderTexture dst, bool alpha)
 => Graphics.Blit(src, dst, GetMaterial(resrc), alpha ? 2 : 3);