View Full Version : glsl + GL_TEXTURE_RECTANGLE on ATI 9700 / (win32)

12-08-2005, 11:07 AM
Hi all,

does anyone know if using
( that means: using samplerRect()
in the shader, not sampler2D())
is supported on ATI 9[2|6|7]00
boards using the latest catalyst drivers?

It was not supported about a year
ago - see this thread:


does anyone know if this has changed?

best regards,

12-10-2005, 02:45 PM
About NPOT texture sampling in GLSL :

- Win32/ATI : Use tex2d, texRect is / will not be supported. NPOT textures 'just works'.

- nVidia : use tex2d or texRect. Both are supported. Uses texRect on GeforceFX is prefered (tex2D will be software emulated on them). On Geforce 6/7 : It will be accelerated.

- MacOS X : use texRect. tex2D is not support. texRect will works on nVidia and ATI.

Check the specification document of GL_ARB_texture_rectangle :

You need to add #extension GL_ARB_texture_rectangle and checks that GL_ARB_texture_rectangle is defined or not (equals 1).

You can write a small shader for testing if texRect is supported in GLSL or not (instead of checkin the vendor name) : it's the recommended way.

Jay Cornwall
12-11-2005, 01:28 AM
Someone clear up the unobvious for me, because the specification has always been a bit unclear on this.

Does ARB_texture_non_power_of_two allow non-square textures? Do the width and height have to be equal, or is this restriction relaxed as well?

12-11-2005, 01:56 AM
there is no restriction on square textuers to my knowledge, neither with NPOTs nor with POTs