Graphics Reference
In-Depth Information
States
A number of state types exist to control the behavior of some fixed function stages of
the pipeline and how samplers behave for shaders.
All shaders can accept several sampler states. The output merger can accept both,
a blend state and depth-stencil state, and the rasterizer accepts a rasterizer state.
The types used are shown in the following table.
Managed type (SharpDX.Direct3D11)
Unmanaged type
BlendState
ID3D11BlendState
BlendState1
ID3D11BlendState1
DepthStencilState
ID3D11DepthStencilState
RasterizerState
ID3D11RasterizerState
RasterizerState1
ID3D11RasterizerState1
SamplerState
ID3D11SamplerState
Resources
A resource is any buffer or texture that is used as an input and/or output from the Direct3D
pipeline. A resource is consumed by creating one or more views to the resource and then
binding them to stages of the pipeline.
Textures
A texture resource is a collection of elements known as texture pixels or texels—which represent
the smallest unit of a texture that can be read or written to by the pipeline. A texel is generally
comprised of between one and four components depending on which format is being used for
the texture; for example, a format of Format.R32G32B32_Float is used to store three 32-bit
floating point numbers in each texel whereas a format of Format.R8G8_UInt represents two
8-bit unsigned integers per texel. There is a special case when dealing with compressed formats
( Format.BC ) where the smallest unit consists of a block of 4 x 4 texels.
A texture resource can be created in a number of different formats as defined by the DXGI
format enumeration ( SharpDX.DXGI.Format and DXGI_FORMAT for managed/unmanaged,
respectively). The format can be either applied at the time of creation, or specified when it is
bound by a resource view to the pipeline.
Hardware device drivers may support different combinations of formats for different purposes,
although there is a list of mandatory formats that the hardware must support depending on the
version of Direct3D. The device's CheckFormatSupport method can be used to determine
what resource type and usage a particular format supports on the current hardware.
Search WWH ::




Custom Search