Graphics.Blit Manual     Reference     Scripting  
Scripting > Runtime Classes > Graphics

static function Blit (source : Texture, dest : RenderTexture) : void

static function Blit (source : Texture, dest : RenderTexture, mat : Material, pass : int = -1) : void


source Source texture.
dest Destination RenderTexture, or null to blit directly to screen.
mat Material to use for copying. Material's shader could do some post-processing effect, for example.
pass If -1 (default), draws all passes in the material. Otherwise, draws given pass only.


Copies source texture into destination render texture.

This is mostly used for implementing image effects.

Blit sets dest to be active render texture, sets source as _MainTex property on the material, and draws a full-screen quad.

See Also: Graphics.BlitMultiTap, image effects.