I’m trying to find a rectangular texture solution that works on both nvidia and ATI graphics hardware - preferablly working on cards that are NOT the newest newest expensive ones. I have GeforceFX5900, and use textureRect / samplerRect very successfully in my GLSL shaders.
ATI seems to not support this the rectangle texture target in GLSL, giving compiler errors for the use of textureRect / samplerRect
Has ATI made any final decisions or plans about whether they will support texturing from the rectangle texture target in GLSL, and what hardware will or won’t support it, and when?
Currently it seems like the only way to achieve support for rectangular texturemapping in GLSL on both NVidia and ATI is to force textures to use GL_TEXTURE_2D, increasing the required size up to the nearest power-of-two size. If ARB_non_power_of_two is available, this is a fine solution and the textures dont need to be oversized (wasting memory), but obviously only the newest generation of cards support that extension.
I’d really like to avoid forcing the use of TEXTURE_2D (on NVidia especially where TEXTURE_RECTANGLE works well), as my application very much depends on rendering to rectangular textures of both RGBA8 and RGBA float formats, and then texturing from them, often at fairly high resolutions. If I run at 1280 x 720 and size my FBO’s/PBuffers using TEXTURE_2D, 2048x1024 textures eat memory up very fast.
Anybody have a good solution for rendering to rectangular sized buffers and texturing from them with GLSL on GeforceFX59xx series and ATI Radeon 9800+ series cards? Am I going to have to write or auto-generate two sets of shaders, one using textureRect for NVidia and another using texture2D for ati?
This is a bit of an unfortunate situation.
here’s an example of the kind of stuff I do -
http://www.treyharrison.com/glslWater.jpg
http://www.treyharrison.com/glslWater.mov
I realize that in this example I am actually rendering to a power-of-two sized buffer (256x256), but my question still stands. I have a video mixing construction that renders DV/DVD resolution (720x480) with pixel shader effects, and definitely needs some kind of rectangular texture support. That screenshot would take several posts though =)
trey