Version: 5.4

RenderTexture

class in UnityEngine

/

Hereda de:Texture

Cambiar al Manual

Descripción

Las Render Texturas son texturas que se pueden renderizar.

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.

Otro caso de uso es la implementación manual de varios efectos de renderizado, por ejemplo Image Effects. Allí a menudo se obtienen render textures temporales de corta duración (GetTemporary and ReleaseTemporary functions), y renderizan manualmente objetos en ellas (mire Graphics.DrawMeshNow y 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

activeRender texture actualmente activa.

Variables

antiAliasingEl nivel antialiasing para la RenderTexture.
colorBufferBuffer de color de la render texture (Lectura solamente).
depthLa precisión del buffer de profundidad de la render texture en bits (0, 16, 24 son compatibles).
depthBufferDepth/stencil buffer de la render texture (lectura solamente).
dimensionDimensionalidad (tipo) de la render texture.
enableRandomWriteHabilita la escritura de acceso aleatoria a esta render texture en Shader Model 5.0 level shaders.
formatEl formato de color de la render texture.
generateMipsDeberían los niveles mipmap ser generados automáticamente?
heightLa altura de la render texture en pixeles.
sRGBEsta render texture utiliza una conversión sRGB lectura/escritura (Lectura solamente).
useMipMapUtilizar mipmaps en una render texture?
volumeDepthExtensión de volumen de una render texture 3D.
widthEl ancho de la render texture en pixeles.

Constructores

RenderTextureCrea un nuevo objeto RenderTexture.

Funciones Públicas

CreateEn realidad crea la RenderTexture.
DiscardContentsDescarta el contenido de la RenderTexture.
GetNativeDepthBufferPtrRecupera un apuntador (API gráfica subyacente) nativo al recurso del depth buffer.
IsCreatedEs la render texture en realidad creada?
MarkRestoreExpectedIndica que hay una operación de restauración RenderTexture esperada.
ReleaseSuelta la RenderTexture.
SetGlobalShaderPropertyAsigna esta RenderTexture como una propiedad global shader llamada propertyName.

Funciones Estáticas

GetTemporaryAsigna una render texture temporal.
ReleaseTemporarySoltar una textura temporal asignada con GetTemporary.
SupportsStencilEsta RenderTexture tiene un stencil buffer?

Miembros heredados

Variables

hideFlags¿Debería el objeto estar oculto, guardado con la escena o modificable por el usuario?
nameEl nombre del objeto.
anisoLevelNivel de filtrado anisotrópico de la textura.
dimensionDimensionalidad (tipo) de la textura (lectura solamente).
filterModeModo de filtrado de la textura.
heightAltura de la textura en pixels. (Read Only)
mipMapBiasMip map bias de la textura.
widthAnchura de la textura en píxeles. (Read Only)
wrapModeModo wrap (Repeat o Clamp) de la textura.

Funciones Públicas

GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringDevuelve el nombre del objeto.
GetNativeTexturePtrRecupere un puntero nativo (API de gráficos subyacente) al recurso de textura.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestruye el objeto obj inmediatamente.
DontDestroyOnLoadHace que el objeto target no sea destruido automáticamente cuando se cargue una nueva escena.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateDevuelve una copia del objeto original.
SetGlobalAnisotropicFilteringLimitsEstablece límites anisotrópicos.

Operadores

bool¿Existe el objeto?
operator !=Compare si dos objetos se refieren a un objeto diferente.
operator ==Compara dos referencias de objeto para ver si se refieren al mismo objeto.