Jump to content

  • Log In with Google      Sign In   
  • Create Account

Texture Types


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 TiagoCosta   Crossbones+   -  Reputation: 2486

Like
0Likes
Like

Posted 10 February 2012 - 06:59 AM

I was wondering if there is any reason to use Texture1D instead of Texture2D with height = 1 or Texture3D instead of Texture2DArray performance wise?

Because using only Texture2D the complexity of my Resource Manager decreases a lot...

Thanks.

Sponsor:

#2 MJP   Moderators   -  Reputation: 11836

Like
1Likes
Like

Posted 10 February 2012 - 12:58 PM

I don't know of any compelling reason to use 1D textures, other than the fact that you don't have to specify a Y/V coordinate when sampling them. However there is definitely a difference between 2D texture arrays and 3D textures. With a texture array, each array slice is completely independent of each other with regards to sampling and mipmaps. So you can use normal trilinear/anisotropic filtering when sampling a slice, and it will be like you sampled a normal 2D texture. With 3D textures however, linear filtering filters in 3 dimensions instead of two. This means that unless you use point filtering or are careful to align your sample positions, nearby W slices will get mixed into your texture fetch. Filtering will also be more expensive, due to more texels being fetched. Another key difference is that with a texture array, each slice is a separate subresource. This means that you can use CopySubresourceRegion to copy a single array slice from one texture to another. Another difference is that texture arrays can be used in conjunction with SV_RenderTargetArrayIndex which lets you control which render target a primitive gets rendered to from the geometry shader.

#3 TiagoCosta   Crossbones+   -  Reputation: 2486

Like
0Likes
Like

Posted 10 February 2012 - 01:09 PM

Thanks for your answer. I just wanted to add that you can also use SV_RenderTargetArrayIndex when rendering to 3D texture and it will behave like when rendering to a 2D texture array.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS