Could some one point me to documentation of the following level-of-detail texture fetch instruction.

Also which GPU’s support lod fetch using 3D textures?

Hi, I have asked for this similar question, look at here…5688#Post235688

I have tried to use hardware accelerated mipmap texturing.

  1. BindTexuture
  2. gluBuildMipmap{1|2}D
    3D texture, maybe you should filter all by your self, then use glTexImage3DEXT to upload different level.
  3. set MAG and MIn to GL_LINEAR_MIPMAP_LINEAR, the hardware will do linear mix on different mip level.
  4. use texture2D() in your GLSL shader, HW will calculate proper level, or you manually set with texture2DLod()

Query you GPU to find whether it supports tex3d, if it supports tex3d, it will support 3d texture mipmap, I thought.

Fragment TextureLod fetches, including Texture3DLod, are hardware accelerated on:
(NV34 can accelerate Texture
Grad, but not Texture*Lod.)

Vertex and geometry fetches are accelerated on a smaller set of hardware.

FWIW, the ARB_texture_shader_lod spec is still sitting in limbo in Khronos bug #2120, sitting with

How come you are aware of that ? Are you a Khronos “insider”, or is this on a public link ?

I am pretty sure this isnt true. The texture 3D extension isnt coupled with GLSL. Also why should one use glTexImage3DEXT for 3D textures, isnt that deprecacted?

3D textures have been in the OpenGL spec for ages, the scary part is that I havent been able to find solid documentation on
GL_ARB_shader_texture_lod. But perhaps someone can point my towards official documentation on GL_ARB_shader_texture_lod ?

Until Khronos gets around to posting the official spec, there isn’t any.

Right now the closest you can get is EXT_gpu_shader4, check the section starting with “vec4 texture1DGrad”.

The ARB_shader_texture_lod behavior is identical, except that the *Grad functions have “ARB” suffices, and you need to use
#extension GL_ARB_shader_texture_lod : <behavior>
instead of
#extension GL_EXT_gpu_shader4 : <behavior>

Oh, and it works on a lot of hardware that can’t support EXT_gpu_shader4.

[quote=ruysch Also why should one use glTexImage3DEXT for 3D textures, isnt that deprecacted?

How that?

For what would one need GL_ARB_shader_texture_lod?
texture2DLod is part of GLSL 1.2?
(even supported by ati, at least I’m think so because rendermonkey colors the texture2DLod call)

The built-in Texture*Lod functions are only available in the vertex shader.

ARB_shader_texture_lod adds the same functions to the fragment shader, and also Texture*Grad functions.

See this old newsletter for an example of why you’d want to use it.