Jump to content
  • Advertisement
Sign in to follow this  
YixunLiu

volume slicing

This topic is 559 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

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

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!