Jump to content
  • Advertisement
Sign in to follow this  
lomateron

1D and 3D textures useless?

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

1D textures have a very limited size

 

3D textures don't support a DepthStencilView

and need the geometry shader to render to it.

 

why would this formats exist?

what can be done with 1D or 3D textures that I can't be done in 2D textures?

 

Share this post


Link to post
Share on other sites
Advertisement

knowing that a 3D shaderResourceView are optimized to be faster when reading near pixels...

can I create a 3D shader resource view of a 2D texture?

I need to use a 2D texture because 3D textures don't support a depthStencilView when rendering to them

Edited by lomateron

Share this post


Link to post
Share on other sites

I tried and I can't create a 3D shader resource view of a 2D texture...

 

Anyone here knows how to organize the texels of a 2D texture so it looks exactly the same as a 3D texture in memory?

Example: I want to create a (100,200,300) 3D texture, how will this look in a 2D texture (?,?)

and how a 2D coordinate transform into a 3D coordinate and the other way around

 

I know I can create my own organization, but as I said I want it to be exactly as a 3D texture because maybe it will have the same performance optimizations.

Edited by lomateron

Share this post


Link to post
Share on other sites


I want to create a (100,200,300) 3D texture, how will this look in a 2D texture (?,?)

 

To represent the same number of texels as that 3D texture you would need to create one very larger 2D texture, e.g. 30,000 x 200 - of course it won't look exactly the same in memory and I would think that mipmapping will be very different and probably give undesirable results. Otherwise 300 separate 100x200 2D textures? 

 

Promit's link on texture tiling is probably what you are after here.

Share this post


Link to post
Share on other sites

If you do manual address translation between 3d and 2d, your memory access pattern is effectively more random than if you'd just simply use 2d coordinates to begin with. This would eat any performance benefits, if there were any.

Edited by Nik02

Share this post


Link to post
Share on other sites

I am doing collision physics on the GPU, the particles are in 3D space, but I can't use 3D texture because of the depthstencilview thing

I already have the collision physics working using 2D textures with a cube space 225x225x225 which is easy to transform to 2D 3375x3375

It is bretty 60 fps smooth when all particles move in the same region and in certain ways but things get horrible when they move randomly,

like 1 fps(I am running in an ATI mobility 4530)

I will now use a 2D texture 4096x8192 (power of 2) where each row is a 3D spacecube of 16x16x16, and I will report if it is faster when particles gets random

 

any suggestions?

Edited by lomateron

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!