Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 08 Jul 2012
Offline Last Active Jan 07 2013 08:08 PM

Posts I've Made

In Topic: R10G10B10A2 and D3DX11SaveTextureToFile

21 December 2012 - 05:54 PM

Yeah it will be a little slow since it will readback the texture on the CPU, and do the conversion there. Plus there will be a delay from having to allocate a new resource. What you could try instead is pre-allocating a Texture2D with the size you need at startup, with the R8G8B8A8_UNORM format. Then when you need a screen shot, you could use a compute shader or full screen render pass to sample the R10G10B10 texture and write it out to the R8G8B8A8 texture. Then you could save the R8G8B8A8 without having to do any conversion on the CPU, or allocating any resources.

Sorry about delayed reply... thanks again for the tip, a fullscreen render pass did the trick and it's faster than D3DX11LoadTextureFromTexture.

In Topic: R10G10B10A2 and D3DX11SaveTextureToFile

08 July 2012 - 08:17 PM

MJP, thank you, D3DX11LoadTextureFromTexture works.


The only downside is that D3DX11LoadTextureFromTexture is a bit slow causing a little freeze.