Results 1 to 3 of 3

Thread: Issue with FBO and ARB_shadow on nvidia hardware...

  1. #1
    Senior Member Frequent Contributor Mars_999's Avatar
    Join Date
    Mar 2001
    Location
    Sioux Falls, SD, USA
    Posts
    519

    Issue with FBO and ARB_shadow on nvidia hardware...

    I have a 7800GT and with FBO's when I do a RTT for my shadowmap with the arb_shadow functions

    Code :
     glTexParameterf(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY);
            glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
            glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
    I get a shadowmap thats 0 or 1 (black or white) but when I render a single quad to check the values my shadowmap is white and no black dots, but the shadowmap works fine in my shaders since I do see shadows. Now if I don't use the above functions from the arb_shadow extension and I RTT I get a 0 to 1 gradient depthmap and when I render it to my single quad I can see the values. This behavior is the same whether its FBO's or glCopyTexImage2D() so as of now I can't check it on ATI to see if it happens there to see if it's a NVIDIA issue or am I missing something. I have called GL_NONE and recalled the
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); and still get the same result nothing is rendered in my single quad but when called in GLSL to apply it to my terrain it renders shadows... So I am out of ideas and stumped. Any help would be great. Thanks

  2. #2
    Member Newbie
    Join Date
    Mar 2003
    Location
    Larnaca, Cyprus
    Posts
    35

    Re: Issue with FBO and ARB_shadow on nvidia hardware...

    I have the same problem when trying to render the shadow map,
    I tried setting
    the GL_DEPTH_TEXTURE_MODE to GL_LUMINANCE
    the GL_Texture_compare_MODE to GL_NONE

    and I get a white quad when rendered :-/
    I also tried:
    the GL_DEPTH_TEXTURE_MODE to GL_INTENSITY
    glEnable(GL_BLEND);
    glBlendFunc(GL_ZERO, GL_SRC_COLOR);

    and it still renders white

    any ideas?
    all we are is dust in the wind, nothing lasts forever but the earth and skies

  3. #3
    Senior Member Frequent Contributor
    Join Date
    May 2005
    Location
    Prague, Czech Republic
    Posts
    913

    Re: Issue with FBO and ARB_shadow on nvidia hardware...

    Originally posted by Mars_9999:
    I get a shadowmap thats 0 or 1 (black or white) but when I render a single quad to check the values my shadowmap is white and no black dots, but the shadowmap works fine in my shaders since I do see shadows.
    The shadowmap sampling does comparison between R coordinate of uv coordinates used for texture lookup and value inside the shadowmap. If value in R coordinate is lower than value in the texture, white color is returned. Otherwise a black color is returned. So what you get depends on R coordinate for your quad.

    What function do you use to sample the shadowmap? It is texture2D* or shadow2D*? If depth comparison is enabled, the shadow2D* must be used. If depth comparison is disabled, the texture2D* must be used. If incorrect function is used, the result is undefined.

Similar Threads

  1. NVIDIA + ATI hardware in the same computer
    By sarobi in forum OpenCL
    Replies: 3
    Last Post: 03-09-2014, 04:49 PM
  2. NVIDIA + ATI hardware in the same Computer
    By cknopp in forum OpenCL
    Replies: 8
    Last Post: 03-17-2010, 04:00 PM
  3. Interesting hardware issue.
    By wizard in forum OpenGL: Advanced Coding
    Replies: 15
    Last Post: 04-22-2008, 02:57 PM
  4. @nvidia: Random behaviour in glsl-shader on nvidia hardware
    By CaseMillennium in forum OpenGL: GLSL
    Replies: 1
    Last Post: 11-16-2006, 11:23 PM
  5. NVidia NVS/ XP / hardware accleration
    By bubbaJr in forum OpenGL: User Software
    Replies: 1
    Last Post: 05-14-2005, 10:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean