nsakart.blogg.se

Unpacking octgn image packs
Unpacking octgn image packs







unpacking octgn image packs unpacking octgn image packs

The following scenario requires that an application take the following sequence of actions to perform in-place image editing. Therefore, the hardware can perform the typical automatic format unpack and pack, can perform texture filtering, and so on where there are no hardware limitations. The benefit of casting the texture to the DXGI_FORMAT_R32_UINT texture format is that later on you can use the appropriate format (for example, DXGI_FORMAT_R16G16_FLOAT) with other views on the same texture, such as Render Target Views (RTVs) or SRVs. By casting the texture to the DXGI_FORMAT_R32_UINT texture format when you create a UAV, you can then simultaneous perform reads and writes to the texture as long as the shader performs manual format unpacking on read and packing on write. Most 32 bit per element formats support casting to DXGI_FORMAT_R32_UINT. However, you can still simultaneously both read from and write to such other formats by casting the texture to the DXGI_FORMAT_R32_UINT texture format when you create a UAV, as long as the original format of the resource supports casting to DXGI_FORMAT_R32_UINT. Format conversion hardware is not available to simultaneously both read from and write to such other formats. You can use only a UAV to random access write to such other formats, or you can use only a Shader Resource View (SRV) to random access read from such other formats. For example, Direct3D 11 does not support simultaneously both reading from and writing to other, more useful formats, such as DXGI_FORMAT_R8G8B8A8_UNORM. However, Direct3D 11 supports simultaneously both reading from and writing to only the DXGI_FORMAT_R32_UINT texture format. It is also included in the 3DX NuGet package.ĭirect3D 11's Unordered Access View (UAV) of a Texture1D, Texture2D, or Texture3D resource supports random access reads and writes to memory from a compute shader or pixel shader. The D3DX_DXGIFormatConvert.inl header ships in the legacy DirectX SDK. To use these inline format conversion functions, include the D3DX_DXGIFormatConvert.inl file in your application. That is, you can perform in-place image editing.

unpacking octgn image packs

You can use these functions in your application to simultaneously both read from and write to a texture. The D3DX_DXGIFormatConvert.inl file contains inline format conversion functions that you can use in the compute shader or pixel shader on Direct3D 11 hardware.









Unpacking octgn image packs