Sign in to follow this  

question about the depth component with volume textures

This topic is 4867 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 want to use a volume texture in my program, but I don't understand how the depth texture coordinate works. For example, in 2D textures, u and v are in [0.0, 1.0], but with 3D textures, w don't seem to be in that range. I used the Texture tool given with the DirectX SDK to create a volume texture with 2 "volume depth", and in my program, the w components was between -0.25 and 0.25 (with w = -0.25, I have the first image of my 3D texture and with w = 0.25, the second one, and between, an interpolation of the 2 images) But if I create a volume texture with more than 2 "volume depth" the range of the w coordinates is not the same. I can't find the relation between the w coordinate and the number of volume depth. any help's welcomed. .:: Paic Citron ::.

Share this post


Link to post
Share on other sites
hum ... after a few hours and some hairs missing this is what i found on the subject :

1) the number of "layer" of the volume texture is rounded to the upper 2^N

2) the value of w to display the first layer of the volume texture is given by : 0.5 / (the rounded number of layers)

3) the step between each layer is : 1.0 / (the rounded number of layers)

...

I understand for the point 3). I didn't find it sooner because I didn't realize that directx was created new layers to make the number of layer a power of 2.
But I really don't understand why the w coordinate don't start at 0 !!!!!

Anyway, now I have the range of the w coordinate, and I can easily navigate through my volume texture.


.:: Paic Citron ::.

Share this post


Link to post
Share on other sites

This topic is 4867 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this