Reputation: 308
I'm working on a volume rendering program using DirectX 11.
I render both to a window ( HWND
) and to a texture ( ID3D11Texture2D
).
While the rendering for the HWND
always looks correct, my ID3D11Texture2D
looks corrupt for render sizes smaller than 64x64:
I wonder whether there is a minimum size limit for textures in DirectX 11.
Unfortunately, I was only able to find information about the maximum texture size limit.
Upvotes: 0
Views: 2055
Reputation: 3584
There is no minimum texture size; 1x1x1 is valid.
It looks to me like you've mapped the 3D texture and are extracting the data while ignoring the "RowPitch" returned. On textures that are sufficiently small (or of unusual dimensions) the address at which the next row of texels begins need not necessarily be contiguous after the previous row, but will instead begin "RowPitch" bytes after the last.
Upvotes: 7