Jump to content
  • Advertisement
Sign in to follow this  

volume slicing

This topic is 641 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


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.




Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!