Camera.RenderWithShader

Switch to Manual
public void RenderWithShader (Shader shader, string replacementTag);

Description

使用替换的着色器渲染摄像机。

有关详细信息,请参阅使用替换的着色器进行渲染页面。

该函数用于渲染摄像机。它将使用摄像机的清除标记、目标纹理和所有其他设置。

摄像机不会OnPreCullOnPreRenderOnPostRender 发送到附加的脚本,也不会渲染图像过滤器。

This is used for special effects, e.g. rendering screenspace normal buffer of the whole Scene, heat vision and so on. To make use of this feature, usually you create a camera and disable it. Then call RenderWithShader on it.

您无法从当前正在渲染的摄像机调用 Render 函数。如果您希望 这样做,请创建该摄像机的一个副本,并使用 CopyFrom 让其与原始摄像机相匹配。

另请参阅:使用替换的着色器进行渲染SetReplacementShaderRender