用户工具

站点工具


侧边栏

script:unityengine:classes:rendertexture:rendertexture

RenderTexture 渲染纹理

class in UnityEngine/Inherits from: Texture

Description 描述

Render textures are textures that can be rendered to.

RenderTexture是可以被渲染的纹理。

They can be used to implement image based rendering effects, dynamic shadows, projectors, reflections or surveillance cameras.

它们可以用来实现基于渲染效果的图像、动态阴影、投影、反射或监视摄像机。

One typical usage of render textures is setting them as the “target texture” property of a Camera (Camera.targetTexture), this will make a camera render into a texture instead of rendering to the screen.

渲染纹理的典型用法之一是设置它们为摄像机的“目标纹理”属性(Camera.targetTexture),该属性将使得相机渲染到纹理而不是渲染到屏幕。

Another use case is manually implementing various rendering effects, for example Image Effects. There you often get temporary short-lived render textures (GetTemporary and ReleaseTemporary functions), and manually render objects into them (see Graphics.DrawMeshNow and Graphics.Blit).

另一种使用方法是手动执行各种各样的渲染效果,例如图像效果。你经常获取临时渲染纹理(GetTemporary和ReleaseTemporary 函数),并且手动渲染对象到它们(请参考Graphics.DrawMeshNow和Graphics.Blit)。

Keep in mind that render texture contents can become “lost” on certain events, like loading a new level, system going to a screensaver mode, in and out of fullscreen and so on. When that happens, your existing render textures will become “not yet created” again, you can check for that with IsCreated function.

请记住渲染纹理内容在某些事件中可能变成“丢失”,像加载新级别,系统运行屏幕保护程序模式,进出全屏等等。当那些发生时,你现在的渲染纹理将会再次变成“还未创建”,你可以使用IsCreated 函数检查。

Static Variables 静态变量

activeCurrently active render texture.
激活当前的渲染贴图。

Variables 变量

antiAliasingThe antialiasing level for the RenderTexture.
渲染纹理的抗锯齿级别。
colorBufferColor buffer of the render texture (Read Only).
渲染纹理的颜色缓存区(只读)。
script/unityengine/classes/rendertexture/rendertexture.txt · 最后更改: 2016/08/02 05:24 (外部编辑)