Hi,
I would like to do volume slicing.
I create a texture3D resource with type DXGI_FORMAT_R16_SINT.
I create a vertex buffer which defines a quad used to slice the volume.
The quad has four vertices and each vertex has two attributes: position and texture coordinate.
My question is how to specify the texture coordinate. I think there are two ways.
One way is to specify the texture coordinate in the range [0, 1]. But for a texture3D resource with type DXGI_FORMAT_R16_SINT, the sampler is not supported. So in the HLSL, I have to convert the texture coordinate from [0, 1] to an index [width, height, depth] and then use Load() to load the value.
For this way, it looks I have to use a constant buffer to store the width, height and depth for the conversion.
The other way is to specify the texture coordinate in the range of [width, height, depth], so in the HLSL, I can directly use Load().
I am not sure if these two ways work and also do not know which one is better.
Thanks.
YL