找回密码
 注册帐号

扫一扫,访问微社区

camera.renderwithshader 用shader渲染

2015-1-4 06:27| 发布者: 杨炎| 查看: 3171| 评论: 0|原作者: 蛮牛|来自: unity3d脚本manual

摘要: camera.renderwithshader 用shader渲染functionrenderwithshader(shader:shader,replacementtag: string) : voiddescription描述render the camera with shader replacement.用shader替代渲染相机。this will render ...

camera.renderwithshader 用shader渲染

functionrenderwithshader(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 sendonprecull,onprerenderoronpostrenderto attached scripts. image filters will not be rendered either.

这个相机不会发送onprecull,onprerender或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.

相关阅读

文章点评
相关文章