Version: 2018.1
Texture compression formats for platform-specific overrides
Custom Render Textures

Render Texture

Los Render Textures son tipos especiales de Textures que son creadas y actualizadas en tiempo de Ejecución. Para utilizarlas, usted primero crea una nueva Render Texture y designa una de sus Cameras para renderizarlas. Luego usted puede utilizar la Render Texture en un Material como una Texture regular. Los Water prefabs en los Unity Standard Assets son un ejemplo de un uso del mundo real de Render Textures para crear reflejos en tiempo real y refracciones.

Propiedades

El Inspector de Render Texture es diferente de la mayoría de Inspectores, pero miu similar al Texture Inspector.

El Inspector Render Texture es casi identico al Texture Inspector
El Inspector Render Texture es casi identico al Texture Inspector

El Render Texture inspector muestra el contenido actual de la Render Texture en tiempo real y puede ser una herramienta de depuracion para efectps que utilizan render textures.

Propiedad: Función:
Dimension The dimensionality (type) of the render texture.
2D The render texture is two-dimensional.
Cube The render texture is a cube map.
3D The render texture is three-dimensional.
Size The size of the render texture in pixels. You can only enter power-of-two values, such as 128 and 256.
Anti-Aliasing The number of anti-aliasing samples. You can select None, 2 samples, 4 samples, or 8 samples. If you select None, Unity does not apply anti-aliasing.
Color Format El formato de color de la render texture.
Depth Buffer The format of the depth buffer. You can select No depth buffer, At least 16 bits depth (no stencil), or At least 24 bits depth (with stencil). The stencil buffer is a general purpose buffer that allows you to store an additional unsigned 8-bit integer (0–255) for each pixel drawn to the screen.
sRGB (Color RenderTexture) Check this box to make the render texture use sRGB read/write conversions.
Enable Mip Maps Check this box to make the render texture generate mipmaps.
Auto generate Mip Maps Check this box to automatically fill the generated mipmaps with relevant data. If you don’t enable this, you’ll have to use the GenerateMips function to fill those mipmaps manually. Alternatively, choose which mip to render into when you call the various SetRenderTarget functions. For more information about the SetRenderTarget functions, see Graphics.SetRenderTarget and Rendering.CommandBuffer.SetRenderTarget.
Dynamic Scaling Check this box to let dynamic resolution scaling resize the render texture. If you don’t enable this, the render texture maintains the same size regardless of the Dynamic Resolution setting.
Wrap Mode Controls how the texture is wrapped:
Repeat Tiles the texture to create a repeating pattern.
Clamp Stretches the edges of the texture. This is useful for preventing wrapping artifacts when you map an image onto an object and you don’t want the texture to tile.
Mirror Tiles the texture to create a repeating pattern that mirrors the texture at every integer boundary.
Mirror Once Mirrors the texture once, and then falls back to clamping.
Per-axis Lets you set different wrap modes for the U axis and the V axis. The available options are also Repeat, Clamp, Mirror and Mirror Once. For example, when you use latitude-longitude environment maps for reflection probes, it is useful to have Clamp on the vertical coordinate (V axis), but Repeat on the horizontal coordinate (U axis).
Filter Mode Controls how the sampling of the texture uses nearby pixels. The options are:
Point Uses the nearest pixel. This makes the texture appear pixelated.
Bilinear Uses a weighted average of the four nearest texels. This makes the texture appear blurry when you magnify it.
Trilinear Uses a weighted average of the two nearest mips, which are bilinearly filtered. This creates a soft transition between mips, at the cost of a slightly more blurry appearance.
Aniso Level Anisotropic filtering level of the texture. This increases texture quality when you view the texture at a steep angle. Good for floor, ground, or road textures.

Ejemplo

Una manera rápida de hacer una camara de arena en vivo para su juego:

  1. Cree un nuevo asset Render Texture con Assets >Create >Render Texture.

  2. Cree una nueva Cámara utilizando GameObject > Camera.

  3. Assigne el Render Texture a la Target Texture de la nueva Camara,

  4. Cree una caja alta, ancha y delgada

  5. Arrastre el Render Texture a esta para crear un Material que utilice la render texture.

  6. Ingrese al Modo de Juego, y observe que la textura de la caja es actualizada en tiempo real basado en el nuevo output de la camara.

Las Render Textures son configuradas como se muestra arriba
Las Render Textures son configuradas como se muestra arriba

  • 2018–11–01 Page published with editorial review

  • Render Texture inspector changed in Unity 2017.2

Texture compression formats for platform-specific overrides
Custom Render Textures