Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Graphics.BlitMultiTap

static function BlitMultiTap(source: Texture, dest: RenderTexture, mat: Material, params offsets: Vector2[]): void;
static void BlitMultiTap(Texture source, RenderTexture dest, Material mat, params Vector2[] offsets);
static def BlitMultiTap(source as Texture, dest as RenderTexture, mat as Material, *offsets as Vector2[]) as void

Parameters

sourceSource texture.
destDestination RenderTexture, or null to blit directly to screen.
matMaterial to use for copying. Material's shader should do some post-processing effect.
offsetsVariable number of filtering offsets. Offsets are given in pixels.

Description

Copies source texture into destination, for multi-tap shader.

This is mostly used for implementing some image effects. For example, Gaussian or iterative Cone blurring samples source texture at multiple different locations. Requires Unity Pro.

BlitMultiTap sets dest to be active render texture, sets source as _MainTex property on the material, and draws a full-screen quad. Each vertex of the quad has multiple texture coordinates set up, offset by offsets pixels.

See Also: Graphics.Blit, image effects.