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.
active | Currently active render texture. |
antiAliasing | The antialiasing level for the RenderTexture. |
colorBuffer | Color buffer of the render texture (Read Only). |
depth | The precision of the render texture's depth buffer in bits (0, 16, 24 are supported). |
depthBuffer | Depth/stencil buffer of the render texture (Read Only). |
enableRandomWrite | Enable random access write into this render texture on Shader Model 5.0 level shaders. |
format | The color format of the render texture. |
generateMips | Should mipmap levels be generated automatically? |
height | The height of the render texture in pixels. |
isCubemap | If enabled, this Render Texture will be used as a Cubemap. |
isVolume | If enabled, this Render Texture will be used as a Texture3D. |
sRGB | Does this render texture use sRGB read/write conversions (Read Only). |
useMipMap | Use mipmaps on a render texture? |
volumeDepth | Volume extent of a 3D render texture. |
width | The width of the render texture in pixels. |
RenderTexture | Creates a new RenderTexture object. |
Create | Actually creates the RenderTexture. |
DiscardContents | Discards the contents of the RenderTexture. |
IsCreated | Is the render texture actually created? |
MarkRestoreExpected | Indicate that there's a RenderTexture restore operation expected. |
Release | Releases the RenderTexture. |
SetGlobalShaderProperty | Assigns this RenderTexture as a global shader property named propertyName. |
GetTemporary | Allocate a temporary render texture. |
ReleaseTemporary | Release a temporary texture allocated with GetTemporary. |
SupportsStencil | Does a RenderTexture have stencil buffer? |
hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? |
name | El nombre del objeto. |
anisoLevel | Nivel de filtrado anisotrópico de la textura. |
filterMode | Modo de filtrado de la textura. |
height | Altura de la textura en pixels. (Read Only) |
mipMapBias | Mip map bias of the texture. |
width | Anchura de la textura en píxeles. (Read Only) |
wrapMode | Wrap mode (Repeat or Clamp) of the texture. |
GetInstanceID | Returns the instance id of the object. |
ToString | Devuelve el nombre del objeto. |
GetNativeTexturePtr | Retrieve native ('hardware') pointer to a texture. |
Destroy | Elimina un gameobject, componente o asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Makes the object target not be destroyed automatically when loading a new scene. |
FindObjectOfType | Devuelve el primer objeto activo cargado de tipo type. |
FindObjectsOfType | Devuelve una lista de todos los objetos activos cargados de tipo type. |
Instantiate | Devuelve el nombre del objeto. |
SetGlobalAnisotropicFilteringLimits | Sets Anisotropic limits. |
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. |