Render Texture
Render Textures are special types of Textures that are created and updated at runtime. To use them, you first
着色器纹理是一种专门的纹理类型 可以在运行时创建或更新。使用他们,首先你
create a new Render Texture and designate one of yourCameras to render into it. Then you can use the Render
要创建一个新的着色器纹理和指定一个你的摄像机去渲染它。 然后你能用这个着色器纹理
Texture in a Material just like a regular Texture. The Water prefabs in Unity Standard Assets are an example of real-
去渲染一个材质就像渲染一个普通的材料那样。在Unity标准资源库中水的预设(注相对于水的对象) 就是一个例子,
world use of Render Textures for making real-time reflections and refractions.
使用纹理渲染实现像真实世界中水的实时反射和折射。
Render Textures are a Unity Pro feature.
渲染纹理是Unity Pro版专有的特色
Properties 属性
The Render Texture Inspector is different from most Inspectors, but very similar to the Texture Inspector.
渲染纹理的属性查看面板不同于大多数的查看面板。但是与纹理的查看面板非常的相似。

The Render Texture Inspector is almost identical to the Texture Inspector
The Render Texture inspector displays the current contents of Render Texture in realtime and can be an invaluable
渲染纹理的查看面板能够实时显示当前渲染纹理的内容
debugging tool for effects that use render textures.
以及它是非常重要的调试渲染纹理效果的工具。
Size 尺寸 | The size of the Render Texture in pixels. Observe that only power-of-two values sizes can be chosen. 渲染纹理的大小是以像素为单位的。观看下只有power-of-two值能够被选择。 |
Aniso Level 各向异性等级 | Increases Texture quality when viewing the texture at a steep angle. Good for floor and ground textures 当在一个比较陡的角度观看时可以提升纹理的质量,这个对于地板和地面来说比较好。 |
Filter Mode 过滤模式 | Selects how the Texture is filtered when it gets stretched by 3D transformations: 当进行3D变换时选择什么样的纹理过滤器 |
No Filtering 无过滤模式 | The Texture becomes blocky up close 纹理变得更近成块状 |
Bilinear 双线性的 | The Texture becomes blurry up close 纹理变得模糊 |
Trilinear 三线的 | Like Bilinear, but the Texture also blurs between the different mip levels 和双线性一样,但纹理在不同层级之间变得模糊 |
Wrap Mode 循环模式 | Selects how the Texture behaves when tiled: 当平铺时选择怎么的纹理 |
Repeat 重复 | The Texture repeats (tiles) itself 纹理自己重复 |
Clamp 钳制 | The Texture's edges get stretched 纹理的边缘向外伸展 |
Example
A very quick way to make a live arena-camera in your game:
在你的游戏中以一个非常快的方式创建一个实时舞台摄像机:
- Create a new Render Texture asset using
- Create a new Camera using .
- Assign the Render Texture to the Target Texture of the new Camera.
- Create a wide, tall and thin box
- Drag the Render Texture onto it to create a Material that uses the render texture.
- Enter Play Mode, and observe that the box's texture is updated in real-time based on the new Camera's output.

Render Textures are set up as demonstrated above
Page last updated: 2013-08-06