Version: 2023.2

Graphics.BlitMultiTap

切换到手册
public static void BlitMultiTap (Texture source, RenderTexture dest, Material mat, params Vector2[] offsets);
public static void BlitMultiTap (Texture source, RenderTexture dest, Material mat, int destDepthSlice, params Vector2[] offsets);
public static void BlitMultiTap (Texture source, Rendering.GraphicsTexture dest, Material mat, params Vector2[] offsets);
public static void BlitMultiTap (Texture source, Rendering.GraphicsTexture dest, Material mat, int destDepthSlice, params Vector2[] offsets);

参数

source 源纹理。
dest Destination RenderTexture, GraphicsTexture, or null to blit directly to screen.
mat 用于复制的材质。材质的着色器应该执行一些后期处理效果。
offsets 可变数量的过滤偏移。偏移以像素为单位。
destDepthSlice 要对其执行 blit 操作的纹理数组目标切片。

描述

将源纹理复制到目标,用于多点着色器。

主要用于实现一些后期处理效果。例如, 高斯或迭代锥形模糊在多个不同位置对源纹理进行采样。

BlitMultiTap sets dest to be the active render target (changing RenderTexture.active and GraphicsTexture.active), 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.

BlitMultiTap 与 Graphics.Blit 具有相同的限制。

另请参阅:Graphics.Blit后期处理效果