Using rectangle texture under GLSL

I want to use rectangle texture provide by GL_ARB_texture_rectangle under GLSL. My problem is that i haven’t found any sampler data type dedicated to rectangle texture in GLSL 1.05 spec.

Is there any possibility to use GL_ARB_texture_rectangle or I need to wait a new release of GLSL ?

From ARB_texture_rectangle

[b]Additions to the OpenGL Shading Language specification

Add the following keywords:
  samplerRect
  samplerRectShadow
Add to section 8.7 "Texture Lookup Functions"
  vec4 textureRect(samplerRect sampler, float coord)
  vec4 textureRectProj(samplerRect sampler, float coord)
No "bias" parameter is allowed because mipmaps are not allowed for texture rectangles.[/b]

Unfortunately, ARB_texture_rectangle is not yet supported by ATI (Catalyst 4.12). I don’t know about nVidia (but would be very surprised if it didn’t work, possibly with some alternate names).

Originally posted by Daniel Wesslen:
ARB_texture_rectangle is not yet supported by ATI (Catalyst 4.12). I don’t know about nVidia (but would be very surprised if it didn’t work, possibly with some alternate names).
NVIDIA already supports it.

I just noticed in the ARB_texture_rectangle extension:

vec4 textureRect(samplerRect sampler, float coord)
vec4 textureRectProj(samplerRect sampler, float coord)
Shouldn’t the second argument be vec2 instead of float?

Thanks :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.