Version: 2017.1

Camera.OnRenderImage(RenderTexture,RenderTexture)

Cambiar al Manual

Descripción

OnRenderImage is called after all rendering is complete to render image.

Efectos de postptroceso (solo en 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.

This message is sent to all scripts attached to the camera.

See Also: Writing Image Effects.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Material mat; void OnRenderImage(RenderTexture src, RenderTexture dest) { Graphics.Blit(src, dest, mat); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961