3D Grid POP vs 3D Texture

Hi I was wondering:

What’s more efficient for spatial computations — using a 3D POP grid with dimensions or a 3D texture? Any difference in GPU memory or performance?

Thanks!

Mini UV

Hello @_mini_uv

It depends on the specific use case. Internally, POPs utilize storage buffers.
For spatial computations, 3D textures are generally more efficient than storage buffers when access patterns exhibit spatial coherence. This is due to hardware-accelerated caching and optimized memory fetches. However, storage buffers offer greater flexibility and can accommodate larger or more irregular datasets.

3D Textures are optimized for spatial locality. GPU texture units use dedicated caches that accelerate access when neighboring pixels are sampled together. 3D textures also supports linear filtering and mipmapping, which are beneficial for smooth sampling and level-of-detail control.

Storage Buffers generally have a higher capacity. They can allocate up to the full available GPU memory, making them suitable for large or sparse datasets. They don’t use caching. Accesses rely on general memory pathways, which may result in slower performance and increased cache misses.

If your computation involves regular, grid-aligned sampling, 3D textures will likely outperform storage buffers in terms of speed and efficiency.

1 Like

Hello @_mini_uv

What @Guillaume.L said (Thank you!). I had replied something that I subsequently deleted since there were a bunch of inaccuracies, I might post the comparison toe again later when it covers more use cases. When bilinear/trilinear sampling is not involved Grid POPs perform actually pretty well, faster in some cases (2D, float3), slower in others (3D Grid, float4) I didn’t get to properly implement/test bilinear/trilinear interpolation in POPs, it’s expected to be a bit slower though.

One precision I wanted to add regarding memory usage, in the case of float3 POPs have an advantage since float3 is actually allocated, whereas in TOPs it’s not supported and float4 has to be allocated. Reading/Writing float3 was also a bit faster as expected in POPs, compared to float4.

The other worthwile note is that half precision float (16bit) which might be sufficient for some purpose, is currently not supported in POPs, though we might add support for more precision formats in POPs in the future.

Cheers,
Vincent

First of all, thank you all for your detailed answers!

Most of the simulations I’ve built so far — like Physarum and other spatially-driven systems — were done using 3D Textures, mainly because they were the most straightforward way to handle spatial computations on the GPU.

But now with POPs and Dimensions, since it’s possible to store and manage a much larger set of attributes efficiently (without splitting everything across multiple 3D Textures), I’m really considering experimenting with a POP-based approach as well.

It got me thinking about which method would actually be faster or more practical in real scenarios. I’ll probably try implementing both and see how they compare in my own setups.

Thanks again for sharing your insights and taking the time to explain things so clearly — really appreciate it! :folded_hands: