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