Results 1 to 10 of 10

Thread: Fill rate problems

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    6

    Fill rate problems

    Hello everyone

    I am new to the forums and somewhat new to OpenGL. Hopefully I put this on the correct board.

    I am currently attempting to implement grass rendering based on this article:
    http://http.developer.nvidia.com/GPU...gems_ch07.html

    I am having some pretty severe frame rate problems that I think are due to fill rate. Using the "grass elements" described in the article (basically three quads forming a skewed triangle or star when viewed from above) and the setup that is described in the article my frame rate drops to 20-25 from certain angles with 400 grass elements (2400 triangles).

    What I do is this:
    - Sort the grass elements in back to front order
    - Enable depth testing
    - Enable blend
    - Draw the elements

    I've tried a few things to try to remedy the low frame rates.

    First I tried to ignore semitransparent texels and sorted the elements front to back, enabled alpha test and disabled blend but this did not fix it.

    Then I thought that maybe my textures were too sparse so I tried using completely filled textures instead but that did not fix it either.

    Note by "not fixed" I mean that from certain angles the frame rate is still as low as 45-50.

    Also note that I have disabled all other things that I thought might affect the frame rate. My vertex shader simply sends the texture coordinates and calculates gl_Position and my fragment shader is only a texture lookup.

    Thanks in advance

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Fill rate problems

    First, what hardware/OS/drivers ?
    Then, which resolution ?

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    6

    Re: Fill rate problems

    Quote Originally Posted by ZbuffeR
    First, what hardware/OS/drivers ?
    Then, which resolution ?
    I am using
    Intel Dual Core T6400 2.0 GHz
    ATI Mobility Radeon HD 4650
    4GB RAM
    Windows 7 64bit

    Drivers are 8.791.0.0 if that tells you anything, according to GLview the OpenGL version is 3.2 and I passed both rendering tests.

    I was running on 800x600 to get the low fps, with 400x300 there is no problem. Furthermore the fps drops when the grass elements only make up a small portion of the screen, i.e. when they are far away or the camera is looking in another direction. These are the reasons I believe it's a fill rate issue.

    Thanks in advance

  4. #4
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,676

    Re: Fill rate problems

    ATI Mobility Radeon HD 4650
    So, a mid-grade laptop GPU. You haven't told us how much grass you're rendering, but it's not like this card is a fillrate monster or anything.

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    6

    Re: Fill rate problems

    Quote Originally Posted by Alfonse Reinheart
    ATI Mobility Radeon HD 4650
    So, a mid-grade laptop GPU. You haven't told us how much grass you're rendering, but it's not like this card is a fillrate monster or anything.
    400 grass elements (2400 triangles)
    I certainly don't have the best hardware but it can still run games like Starcraft 2, Oblivion, Dragon Age etc. so I figured the low fill rate was probably due to my lack of OpenGL experience rather than the hardware. If these kinds of scenes really can't be rendered in real time on my computer then I have a problem .

    Again, if you have any ideas or need any additional info please let me know!

    Thanks in advance

  6. #6
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,161

    Re: Fill rate problems

    What's the frame rate like when you do no sorting at all? (obviosuly you'll get rendering 'errors' - but it's worth seeing if this is the cause of the slow down).

    There is another way to get semi-transparetn rendering without blending. Sample_Alpha_To_Coverage. See nVidia SDK 9.5 as they have an example. The results are not as good a blending but way, way better than alpha test.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    6

    Re: Fill rate problems

    Quote Originally Posted by BionicBytes
    What's the frame rate like when you do no sorting at all? (obviosuly you'll get rendering 'errors' - but it's worth seeing if this is the cause of the slow down).

    There is another way to get semi-transparetn rendering without blending. Sample_Alpha_To_Coverage. See nVidia SDK 9.5 as they have an example. The results are not as good a blending but way, way better than alpha test.
    There are only 400 elements to sort so the time is very minimal, turning it off doesn't change the frame rate. Furthermore the frame rate is good when I only view a few grass elements at the time or when they are very far away regardless of sorting.

    I'll check Sample_Alpha_To_Coverage out and get back when I've had time to code it up.

    Thanks!

    To everyone else who might be reading. Please realize that I am a beginner so things you might take for granted that I've thought of are worth bringing up.

    Thanks in advance

  8. #8
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    6

    Re: Fill rate problems

    Quote Originally Posted by Brunstgnegg
    Quote Originally Posted by BionicBytes
    What's the frame rate like when you do no sorting at all? (obviosuly you'll get rendering 'errors' - but it's worth seeing if this is the cause of the slow down).

    There is another way to get semi-transparetn rendering without blending. Sample_Alpha_To_Coverage. See nVidia SDK 9.5 as they have an example. The results are not as good a blending but way, way better than alpha test.
    There are only 400 elements to sort so the time is very minimal, turning it off doesn't change the frame rate. Furthermore the frame rate is good when I only view a few grass elements at the time or when they are very far away regardless of sorting.

    I'll check Sample_Alpha_To_Coverage out and get back when I've had time to code it up.

    Thanks!

    To everyone else who might be reading. Please realize that I am a beginner so things you might take for granted that I've thought of are worth bringing up.

    Thanks in advance
    I tried Sample_Alpha_To_Coverage instead of blend but it did not have any noticeable impact on fps compared to blend and was worse than alpha test with front to back sorting (which isn't really surprising).

  9. #9
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Fill rate problems

    I guess with such hardware you have no other choice than reducing overdraw.
    You said earlier that it depends on the view angle.
    Explore that with an artificial rendering :
    - everything but the grass is black
    - draw grass blades same as usual, with following changes :
    - no texture, pure color like : 1,1,1,255 (or bit lighter)
    - additive blending

    Then try to verify the correlation between overdraw and view angle.
    A fix could be to change grass settings and reduce number of grass blades depending on view angle.

    EDIT: what about mipmaps ? Not using mipmaps will kill performance for distant textures.

  10. #10
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    6

    Re: Fill rate problems

    Quote Originally Posted by ZbuffeR
    I guess with such hardware you have no other choice than reducing overdraw.
    You said earlier that it depends on the view angle.
    Explore that with an artificial rendering :
    - everything but the grass is black
    - draw grass blades same as usual, with following changes :
    - no texture, pure color like : 1,1,1,255 (or bit lighter)
    - additive blending

    Then try to verify the correlation between overdraw and view angle.
    A fix could be to change grass settings and reduce number of grass blades depending on view angle.

    EDIT: what about mipmaps ? Not using mipmaps will kill performance for distant textures.
    Yes!

    Mipmaps solved it, can't believe I didn't think of that.

    Thanks for your help!

Similar Threads

  1. Help with documentation and texel fill-rate
    By NeighborhoodCroak in forum OpenGL: User Software
    Replies: 4
    Last Post: 07-13-2012, 06:28 AM
  2. Fill rate limited?
    By Mars_999 in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 06-19-2006, 03:30 PM
  3. Fill Rate will kill me
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 10-24-2003, 06:45 PM
  4. Trying to get good fill rate…
    By ToolChest in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 10-23-2002, 03:53 PM
  5. Fill rate limited?
    By julius in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-13-2001, 06:09 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