When you write rendering code, you might intuitively think we are just drawing to the screen, but you would be wrong! In MoonWorks, we are always drawing to an object called a render target. You can think of a render target like a canvas. It can be whatever size we want and whatever color format, and we can composite them together to get our final render.
Multisampling is a technique which can produce higher-quality images at a processing cost. You can [read more about multisampling elsewhere](https://www.khronos.org/opengl/wiki/Multisampling) if you're interested. If you don't want multisampling, simply use `SampleCount.One` or omit the sample count argument.
When we use a texture slice to create a render target, we say that the render target is "backed" by the texture slice. This code will create a render target that is backed by `myTextureSlice`. In order to use a texture as a backing texture, you need to make sure you create it with the `TextureUsageFlags.RenderTarget` flag.
A lot of the time you will be creating render targets and textures at the same time. We have a nice shortcut for that.
This code creates a 1280x720 color render target, and creates the backing texture alongside it.
Another important kind of render target is a "depth buffer". Depth buffers are used so that the graphics card can know to skip rendering on pixels that will be obscured by other objects. This can be a major optimization.
To create a depth buffer, you must use one of the depth texture formats.
```cs
var textureCreateInfo = new TextureCreateInfo
{
Width = 1280,
Height = 720,
Depth = 1,
Format = TextureFormat.D32,
IsCube = false,
LevelCount = 1,
SampleCount = SampleCount.One,
UsageFlags = TextureUsageFlags.RenderTarget
};
var depthTexture = new Texture(GraphicsDevice, textureCreateInfo);
One last thing to note - depth buffers can also contain a "stencil buffer". Stencil buffers provide a much more nuanced way to cull pixels from rendering in particular cases. You should [read more about that](https://www.khronos.org/opengl/wiki/Stencil_Test) if you're interested.
```cs
var depthStencilBuffer = RenderTarget.CreateDepthStencilBuffer(