ドキュメント

Unity Engine

Download Unity

Unity Engine

OnRenderImage(RenderTexture, RenderTexture)

Event function that Unity calls after a Camera has finished rendering, that allows you to modify the Camera's final image.
読み終わるまでの所要時間 1 分最終更新 5日前

Definition

OnRenderImage()

public void OnRenderImage(RenderTexture source, RenderTexture destination)

Parameters

A RenderTexture containing the source image.

destination

The RenderTexture to update with the modified image.

Remarks

OnRenderImage
is deprecated because the Built-In Render Pipeline is removed. Unity logs a warning for each script that implements it, and will stop calling it in a future version. In the Built-In Render Pipeline, Unity calls
OnRenderImage
on MonoBehaviours that are attached to the same GameObject as an enabled Camera component, after the Camera finished rendering. You can use
OnRenderImage
to create a fullscreen post-processing effect. For a full description and code example, see MonoBehaviour.OnRenderImage(RenderTexture, RenderTexture).
OnRenderImage
is not supported in the Scriptable Render Pipeline. To create custom fullscreen effects in the Universal Render Pipeline (URP), use the ScriptableRenderPass API. To create custom fullscreen effects in the High Definition Render Pipeline (HDRP), use a Fullscreen Custom Pass.