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.

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.

As with other "native engine object" types, it is important to pay attention to the lifetime of any render textures and release them when you are finished using them with the Release function, as they will not be garbage collected like normal managed types.

See Also: Camera.targetTexture.

Variables Estáticas

activeRender texture actualmente activa.

Variables

antiAliasingEl nivel antialiasing para la RenderTexture.
autoGenerateMipsMipmap levels are generated automatically when this flag is set.
bindTextureMSIf true and antiAliasing is greater than 1, the render texture will not be resolved by default. Use this if the render texture needs to be bound as a multisampled texture in a shader.
colorBufferBuffer de color de la render texture (Lectura solamente).
depthThe precision of the render texture's depth buffer in bits (0, 16, 24/32 are supported).
depthBufferDepth/stencil buffer de la render texture (lectura solamente).
descriptorThis struct contains all the information required to create a RenderTexture. It can be copied, cached, and reused to easily create RenderTextures that all share the same properties.
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.
heightLa altura de la render texture en pixeles.
memorylessModeThe render texture memoryless mode property.
sRGBDoes this render texture use sRGB read/write conversions? (Read Only).
useDynamicScaleIs the render texture marked to be scaled by the Dynamic Resolution system.
useMipMapRender texture has mipmaps when this flag is set.
volumeDepthVolume extent of a 3D render texture or number of slices of array texture.
vrUsageIf this RenderTexture is a VR eye texture used in stereoscopic rendering, this property decides what special rendering occurs, if any.
widthEl ancho de la render texture en pixeles.

Constructores

RenderTextureCrea un nuevo objeto RenderTexture.

Funciones Públicas

ConvertToEquirectConverts the render texture to equirectangular format (both stereoscopic or monoscopic equirect). The left eye will occupy the top half and the right eye will occupy the bottom. The monoscopic version will occupy the whole texture. Texture dimension must be of type TextureDimension.Cube.
CreateEn realidad crea la RenderTexture.
DiscardContentsHint the GPU driver that the contents of the RenderTexture will not be used.
GenerateMipsGenerate mipmap levels of a render texture.
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.
ResolveAntiAliasedSurfaceForce an antialiased render texture to be resolved.
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 Estáticas

currentTextureMemoryThe amount of memory currently being used by textures.
desiredTextureMemoryThis amount of texture memory would be used before the texture streaming budget is applied.
nonStreamingTextureCountNumber of non-streaming textures.
nonStreamingTextureMemoryTotal amount of memory being used by non-streaming textures.
streamingMipmapUploadCountHow many times has a texture been uploaded due to texture mipmap streaming.
streamingRendererCountNumber of renderers registered with the texture streaming system.
streamingTextureCountNumber of streaming textures.
streamingTextureDiscardUnusedMipsForce the streaming texture system to discard all unused mipmaps immediately, rather than caching them until the texture memory budget is exceeded.
streamingTextureForceLoadAllForce streaming textures to load all mipmap levels.
streamingTextureLoadingCountNumber of streaming textures with mipmaps currently loading.
streamingTexturePendingLoadCountNumber of streaming textures with outstanding mipmaps to be loaded.
targetTextureMemoryThe amount of memory used by textures after the mipmap streaming and budget are applied and loading is complete.
totalTextureMemoryThe total amount of memory that would be used by all textures at mipmap level 0.

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.
dimensionDimensionalidad (tipo) de la textura (lectura solamente).
filterModeModo de filtrado de la textura.
heightAltura de la textura en pixels. (Read Only)
imageContentsHashThe hash value of the Texture.
mipMapBiasMip map bias de la textura.
updateCountThis counter is incremented when the texture is updated.
widthAnchura de la textura en píxeles. (Read Only)
wrapModeTexture coordinate wrapping mode.
wrapModeUTexture U coordinate wrapping mode.
wrapModeVTexture V coordinate wrapping mode.
wrapModeWTexture W coordinate wrapping mode for Texture3D.

Funciones Públicas

GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringReturns the name of the GameObject.
GetNativeTexturePtrRecupere un puntero nativo (API de gráficos subyacente) al recurso de textura.
IncrementUpdateCountIncrement the update counter.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object 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.
InstantiateClona el objeto original y devuelve el clon.
SetGlobalAnisotropicFilteringLimitsEstablece límites anisotrópicos.
SetStreamingTextureMaterialDebugPropertiesUploads additional debug information to materials using textures set to stream mip maps.

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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961