Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

RenderTexture

class in UnityEngine

/

Hereda de:Texture

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual

Descripción

Render textures are textures that can be rendered to.

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.

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).

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.

See Also: Camera.targetTexture.

Variables Estáticas

activeCurrently active render texture.

Variables

antiAliasingThe antialiasing level for the RenderTexture.
colorBufferColor buffer of the render texture (Read Only).
depthThe precision of the render texture's depth buffer in bits (0, 16, 24 are supported).
depthBufferDepth/stencil buffer of the render texture (Read Only).
enableRandomWriteEnable random access write into this render texture on Shader Model 5.0 level shaders.
formatThe color format of the render texture.
generateMipsShould mipmap levels be generated automatically?
heightThe height of the render texture in pixels.
isCubemapIf enabled, this Render Texture will be used as a Cubemap.
isVolumeIf enabled, this Render Texture will be used as a Texture3D.
sRGBDoes this render texture use sRGB read/write conversions (Read Only).
useMipMapUse mipmaps on a render texture?
volumeDepthVolume extent of a 3D render texture.
widthThe width of the render texture in pixels.

Constructores

RenderTextureCreates a new RenderTexture object.

Funciones Públicas

CreateActually creates the RenderTexture.
DiscardContentsDiscards the contents of the RenderTexture.
IsCreatedIs the render texture actually created?
MarkRestoreExpectedIndicate that there's a RenderTexture restore operation expected.
ReleaseReleases the RenderTexture.
SetGlobalShaderPropertyAssigns this RenderTexture as a global shader property named propertyName.

Funciones Estáticas

GetTemporaryAllocate a temporary render texture.
ReleaseTemporaryRelease a temporary texture allocated with GetTemporary.
SupportsStencilDoes a RenderTexture have stencil buffer?

Miembros heredados

Variables

hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameEl nombre del objeto.
anisoLevelNivel de filtrado anisotrópico de la textura.
filterModeModo de filtrado de la textura.
heightAltura de la textura en pixels. (Read Only)
mipMapBiasMip map bias of the texture.
widthAnchura de la textura en píxeles. (Read Only)
wrapModeWrap mode (Repeat or Clamp) of the texture.

Funciones Públicas

GetInstanceIDReturns the instance id of the object.
ToStringDevuelve el nombre del objeto.
GetNativeTexturePtrRetrieve native ('hardware') pointer to a texture.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateDevuelve el nombre del objeto.
SetGlobalAnisotropicFilteringLimitsSets Anisotropic limits.

Operadores

bool¿Existe el objeto?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.