Graphics Reference
In-Depth Information
Textures do not just store image data. They are used for information,
such as height-maps, displacement-maps, or for any data structure that
needs to be read or written within a shader that can benefit from the
speed benefits of hardware support for textures and texture sampling.
Types of texture resources include:
F 1D Textures and 1D Texture Arrays
F 2D Textures and 2D Texture Arrays
F 3D Textures (or volume textures)
F Unordered access textures
F Read/Write textures
The following table maps the managed to unmanaged types for the different textures.
Managed type (SharpDX.Direct3D11)
Unmanaged type
Texture1D
ID3D11Texture1D
Texture2D
ID3D11Texture2D
Texture3D
ID3D11Texture3D
Arrays of 1D and 2D textures are configured with the subresource data associated with the
description of the texture passed into the appropriate constructor. A common use for texture
arrays is supporting Multiple Render Targets (MRT).
Resource views
Before a resource can be used within a stage of the pipeline it must first have a view.
This view describes to the pipeline stages what format to expect the resource in and what
region of the resource to access. The same resource can be bound to multiple stages of the
pipeline using the same view, or by creating multiple resource views.
It is important to note that although a resource can be bound to multiple stages of the pipeline,
there may be restrictions on whether the same resource can be bound for input and output at
the same time. As an example, a Render Target View (RTV) and Shader Resource View (SRV)
for the same resource both cannot be bound to the pipeline at the same time. When a conflict
arises the read-only resource view will be automatically unbound from the pipeline, and if the
debug layer is enabled, a warning message will be output to the debug output.
Search WWH ::




Custom Search