Version: 2017.2

Camera.OnRenderImage(RenderTexture,RenderTexture)

Switch to Manual

Description

OnRenderImage вызывается после того как весь рендеринг для отрисовки изображения завершиться.

Эффекты постобработки (только для Unity Pro).

It allows you to modify final image by processing it with shader based filters. The incoming image is source render texture. The result should end up in destination render texture. You must always issue a Graphics.Blit() or render a fullscreen quad if your override this method.

When there are multiple image filters attached to the camera, they process image sequentially, by passing first filter's destination as the source to the next filter.

Это сообщение отсылается всем скриптам прикрепленным к камере.

See Also: Writing Post-Processing Effects.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Material mat; void OnRenderImage(RenderTexture src, RenderTexture dest) { Graphics.Blit(src, dest, mat); } }