class RenderTarget
Essentially wraps a couple of textures that we're going to render to. The color texture and the depth texture.
public static RenderTarget GetTemporary( int width, int height, ImageFormat colorFormat = Default, ImageFormat depthFormat = Default, MultisampleAmount msaa = MultisampleNone, int numMips = 1 )
Get a temporary render target. You should dispose the returned handle when you're done to return the textures to the pool.
widthWidth of the render target you want.heightHeight of the render target you want.colorFormatThe format for the color buffer. If set to default we'll use whatever the current pipeline is using.depthFormatThe format for the depth buffer.msaaThe number of msaa samples you'd like. Msaa render textures are a pain in the ass so you're probably gonna regret trying to use this.numMipsNumber of mips you want in this texture. You probably don't want this unless you want to generate mips in a second pass.- Returns A RenderTarget that is ready to render to.
public static RenderTarget GetTemporary( int sizeFactor, ImageFormat colorFormat = Default, ImageFormat depthFormat = Default, MultisampleAmount msaa = MultisampleNone, int numMips = 1 )
Get a temporary render target. You should dispose the returned handle when you're done to return the textures to the pool.
sizeFactorDivide the screen size by this factor. 2 would be half screen sized. 1 for full screen sized.colorFormatThe format for the color buffer. If null we'll choose the most appropriate for where you are in the pipeline.depthFormatThe format for the depth buffer.msaaThe number of msaa samples you'd like. Msaa render textures are a pain in the ass so you're probably gonna regret trying to use this.numMipsNumber of mips you want in this texture. You probably don't want this unless you want to generate mips in a second pass.- Returns A RenderTarget that is ready to render to.
public int Width { get; }
Width of the render target
public int Height { get; }
Height of the render target
public Texture ColorTarget { get; }
The target colour texture
public Texture DepthTarget { get; }
The target depth texture
public static RenderTarget From( Texture color, Texture depth = null )
Create a render target from these textures
public void Dispose( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.