Version: 2017.3
public void Blit (Texture source, Rendering.RenderTargetIdentifier dest);
public void Blit (Texture source, Rendering.RenderTargetIdentifier dest, Material mat);
public void Blit (Texture source, Rendering.RenderTargetIdentifier dest, Material mat, int pass);
public void Blit (Texture source, Rendering.RenderTargetIdentifier dest, Vector2 scale, Vector2 offset);
public void Blit (Rendering.RenderTargetIdentifier source, Rendering.RenderTargetIdentifier dest, Material mat, int pass);
public void Blit (Rendering.RenderTargetIdentifier source, Rendering.RenderTargetIdentifier dest, Vector2 scale, Vector2 offset);

파라미터

source Source texture or render target to blit from.
dest Destination to blit into.
mat Material to use.
pass Shader pass to use (default is -1, meaning "all passes").
scale Scale applied to the source texture coordinate.
offset Offset applied to the source texture coordinate.

설명

Add a "blit into a render texture" command.

This is similar to Graphics.Blit - it is mostly for copying from one (render)texture into another, potentially using a custom shader.

Source texture or render target will be passed to the material as "_MainTex" property.

Render texture to use can be indicated in several ways: a RenderTexture object, a temporary render texture created with GetTemporaryRT, or one of built-in temporary textures (BuiltinRenderTextureType). All that is expressed by a RenderTargetIdentifier struct, which has implicit conversion operators to save on typing.

Note that Blit changes the currently active render target. After Blit executes, dest becomes the active render target.

See Also: GetTemporaryRT, RenderTargetIdentifier.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961