Using RECT textures in GLSL? (nVidia specific)

Is it possible to access RECT texture with nVidia GLSL implementation (and Cg extensions)?

The driver accepts the declaration of a samplerRECT but doesn’t seem to know about textureRECT (did it got another name? is it just not in yet? any other doc besides the GDC slides?)

NVidia already support(in det 60) ARB_NPOT extension.

I’m on 61.11 on a 5900 and NPOT isn’t in the extension list… wouldn’t NPOT be only supported by the 6800?

You need to use the sampler2DRect type and the textureRect function to use rectangular textures.

What’s samplerRECT?

Thanks! Works like a charm with texture2DRect and texture2DRectProj :slight_smile:

Btw great work on the compiler nVidia, if the GLSL-Cg mix is annoying for validation purposes (as raised in another topic), it makes working with the shader language a real pleasure. Having access to the standard uniforms and varying variables directly without having to declare/bind them is the little plus of GLSL that could be a worthy addition to a future version of “pure” Cg if there is one planned.

> What’s samplerRECT?

The name for the rectangle texture sampler in Cg (for textures with non-power of two dimensions on hardware that doesn’t support the full monty).

>>I’m on 61.11 on a 5900 and NPOT isn’t in the extension list… wouldn’t NPOT be only supported by the 6800?
sorry, I forget about NV40 emulation settings on my system :-(.

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