Search code examples
c#openglopentk

OpenGL - Using Bindless Textures on sampler2D disables TextureCubeMapSeamless


I am using Cubemaps in my renderer and have TextureCubeMapSeamless enabled to filter between the 6 images. Works fine. Currently I am experimenting with ARB_bindless_texture on sampler2D. My problem is that as soon as I make use of this extension, that could be declaring a UBO with sampler2D[] in it or doing an explicit cast to sampler2D, TextureCubeMapSeamless gets disabled and I have visible lines between the Cubemap images. Now bindless texture itself works just like expected. I can read from the sampler2D and the output is the same as with a "normal" texture.

My question would be: How can I use ARB_bindless_texture on sampler2D and have TextureCubeMapSeamless enabled at the same time? Is it a driver bug, they seem somewhat unrelated to me?


Solution

  • As far as I can tell, this is not the intended behavior, but people who need bindless are less likely to conditionally use bindless vs. a regular uniform based on seamless cubemap texturing. So that's likely why the bug came into being; nobody noticed it.

    That being said, I would suggest switching to ARB/AMD_seamless_cubemap_per_texture. This seamless cubemap field is respected by bindless texturing. The ARB version is pretty widely implemented, particularly since you're using bindless.