Legacy:TextureRenderTarget2D

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search
UT3:: Object (UT3) >> Surface (UT3) >> Texture (UT3) >> TextureRenderTarget >> TextureRenderTarget2D (Package: Engine)

A 2D render target texture resource. This can be used as a target for rendering as well as rendered as a regular 2D texture resource. It is usually combined with a SceneCapture2DComponent to create monitors, with SceneCapturePortalComponent to create portal views or with a SceneCaptureMirrorComponent to create mirrors. In UT3 Patch 2, a new subclass, ScriptedTexture (UT3) was added to allow drawing arbitrary text and textures to another texture, like it was possible in previous engine generations already.

In UT and UT2004 the same effect as drawing a TextureRenderTarget2D onto the screen could be achieved by using the Canvas (UT) function DrawPortal(). In UT2004 the same effect as using a TextureRenderTarget2D as an actor or BSP surface material could be achieved by using the DrawPortal() function in the ScriptedTexture class.

Properties

Group TextureRenderTarget2D

TextureAddress AddressX 
The addressing mode to use for the X axis.
TextureAddress AddressY 
The addressing mode to use for the Y axis.
int SizeX (const) 
The width of the texture.
int SizeY (const) 
The height of the texture.

Hidden Properties

LinearColor ClearColor (const) 
The color the texture is cleared to.
EPixelFormat Format (const) 
The format of the texture data.

Static Functions

TextureRenderTarget2D Create(int InSizeX, int InSizeY, optional EPixelFormat InFormat, optional LinearColor InClearColor, optional bool bOnlyRenderOnce) [native, final] 
Creates and initializes a new TextureRenderTarget2D with the requested settings.
All optional parameters default to their null values, except for InFormat, which defaults to PF_A8R8G8B8, i.e. 32bit RGBA with 8 bits assigned to each channel. Note that the null value of InClearColors LinearColor struct has an A value of 1.0, i.e. the texture will be fully opaque black.

Known Subclasses