Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: Using RECT textures in GLSL? (nVidia specific)

  1. #1
    Intern Contributor
    Join Date
    Jul 2002
    Posts
    66

    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?)

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    Kiev, Ukraine
    Posts
    130

    Re: Using RECT textures in GLSL? (nVidia specific)

    NVidia already support(in det 60) ARB_NPOT extension.
    Andrey Yaromenok

  3. #3
    Intern Contributor
    Join Date
    Jul 2002
    Posts
    66

    Re: Using RECT textures in GLSL? (nVidia specific)

    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?

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Jan 2001
    Location
    NVIDIA, Austin, TX
    Posts
    555

    Re: Using RECT textures in GLSL? (nVidia specific)

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

  5. #5
    Intern Contributor
    Join Date
    Apr 2004
    Location
    Sweden
    Posts
    67

    Re: Using RECT textures in GLSL? (nVidia specific)

    What's samplerRECT?

  6. #6
    Intern Contributor
    Join Date
    Jul 2002
    Posts
    66

    Re: Using RECT textures in GLSL? (nVidia specific)

    Thanks! Works like a charm with texture2DRect and texture2DRectProj

    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).

  7. #7
    Junior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    Kiev, Ukraine
    Posts
    130

    Re: Using RECT textures in GLSL? (nVidia specific)

    >>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 :-(.
    Andrey Yaromenok

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •