Jump to content
  • Advertisement
Sign in to follow this  

Volume texture access

This topic is 2790 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 everyone,

I'm working on some problems which need to use volume texture.

My volume texture is created by a list of 300 images.
After creating the texture, i want to use 1 image (texture) from this volume texture.

How can i access 1 texture of the Volume texture and use it like normal texture. For example, i want to use the image (texture) 3 in volume texture to do like this

pd3dDevice->SetTexture (0,thirdTexture);


I wish i can use Volume Texture like an array, and just add the index to access the texture i want (ie. pVolumeTexture)

Share this post

Link to post
Share on other sites
If you are using dx9, by using shaders you can access individual slice like this:

sampler volumeSampler : register(s0);
texCoord = float3(IN.texCoord.xy, (1.0f / TotalSlicesInVolume) * SliceYouWant);
color = tex3D(volumeSampler, texCoord);

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.

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!