Sign in to follow this  

Technical Differences between Texture1DArray and Texture2D?

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

To my best knowledge, Texture1DArrays must all be of the same length. So what makes a Texture1DArray containing 10 texture1Ds, each with a width of 256 texels, different from a Texture2D of size 256x10?

As far as I can tell they all take up one texture register, the same amount of memory and are even accessed in the same way, so is there any real difference in implementation or is the only difference just the name?

I assume the same argument applies to Texture2D arrays and Texture3Ds too.

Share this post


Link to post
Share on other sites
They're sampled differently. When you sample from a Texture2D it takes a 2x2 block and does a weighted average of all 4 texels (assuming standard linear filtering), when you sample from a Texture1D array it takes a 2x1 block from the slice you specify and does a weighted average of that.

In other words, it does not interpolate between slices in the array.

Share this post


Link to post
Share on other sites

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