Camera.RenderWithShader 用Shader渲染

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


Render the camera with shader replacement.


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.


参见:SetReplacementShader, Render.

Page last updated: 2011-3-7