I'm to loading an image (jpg, png, bmp,..., dds) into a Texture2D.
then i do some operations on it like creating a normalmap, or generating mip maps etc.
and after those operations i want to show output in a WPF application
when the user then accepts the final image, it gets saved as a dds file.
and everything works, except the outputting.
I tried a few different methods:
- D3DImage interop
- Texture2D.ToStream(texture.Device.ImmediateContext, texture, ImageFileFormat.Bmp, stream);
- Texture2D.SaveToFile(texture.Device.ImmediateContext, texture, ImageFileFormat.Bmp, "tmp.bmp");
results: it works, but only for R8B8G8A8_UNorm formats, not for BC*_UNorm
i've also tried with LoadTextureFromTexture to convert it first to R8B8G8A8, but that doesn't seem to be working either.
is there any way i can set this up without having to create a render target, a fullscreen quad and issue some(/one) drawcalls?