Camera.RenderWithShader 用Shader渲染

function RenderWithShader (shader : Shader, replacementTag : string) : void

Description描述

Render the camera with shader replacement.

用shader替代渲染相机。

This will render the camera. It will use the camera's clear flags, target texture and all other settings.

这个将渲染相机,这将使用相机的清除标记,目标设置为其它所有设置。

The camera will not send OnPreCull, OnPreRender or OnPostRender to attached scripts. Image filters will not be rendered either.

这个相机不会发送OnPreCullOnPreRender 或OnPostRender到附加的脚本,图像滤镜也不会被渲染

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.

这个可用于特效,例如整个场景屏幕空间缓冲,热效果等等。为了使用这个特性,创建一个相机并禁用它,然后在它上面调用RenderWithShader。

参见:SetReplacementShader, Render.

Page last updated: 2011-3-7