Hello,
I am creating a R32_Float Texture/RenderTarget which I am writing to in a shader.
For debugging purposes I was hoping to render this texture to the screen but I can't seem to find any method to do this.
Tried creating a Direct2D bitmap, but I get a Pixel Format Not Supported exception.
The end result is I want to be able to read from the texture on the CPU side after it has been created on the GPU side.
thanks
P.
(texture description creation)
var desc = new SharpDX.Direct3D11.Texture2DDescription()
{
ArraySize = 1,
BindFlags = SharpDX.Direct3D11.BindFlags.RenderTarget | SharpDX.Direct3D11.BindFlags.ShaderResource,
CpuAccessFlags = SharpDX.Direct3D11.CpuAccessFlags.None,
Format = SharpDX.DXGI.Format.R32_Float,
Width = width,
Height = height,
MipLevels=1,
OptionFlags = SharpDX.Direct3D11.ResourceOptionFlags.None,
SampleDescription = new SharpDX.DXGI.SampleDescription(1, 0),
Usage = SharpDX.Direct3D11.ResourceUsage.Default
};