Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Fillrate Question

  1. #1
    Member Newbie
    Join Date
    Apr 2002
    Location
    Berlin
    Posts
    49

    Fillrate Question

    Hi there,

    I'm quite new to OpenGL and 3D Programming and can't explain what I lately discovered:

    I set a 512x512 Texture and render about 10k triangles using this texture. Rendering is done with vertex arrays and multiple calls to flDrawElements. Each of that calls renders 8 triangles.

    It' seems that fillrate on my GeForce 2 is the limeting factor. When I use a smaller texture (64*64) frame rates double from 50 fps to 100 fps. How can this be explained ?

    I thought it doesn't matter what size a texture has as long as it fits into texture memory ? Is cache usage with a smaller texture so much better ?

    Please give me a hint

  2. #2
    Member Contributor
    Join Date
    Feb 2000
    Location
    Gothenburg, Sweden
    Posts
    68

    Re: Fillrate Question

    Yes.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: Fillrate Question

    Just a guess. Since OpenGL has to map texels to pixels, mapping more texels should take more time. Hence larger textures should be slower. Of course I'm no expert and could be wrong.

  4. #4
    Member Newbie
    Join Date
    Apr 2002
    Location
    Berlin
    Posts
    49

    Re: Fillrate Question

    I thought things would function like this: OpenGL tries to find the right color for every pixel on screen by looking up the nearest texels an doing so filtering afterwards. It shouldn't matter wether 4 texels (in case of bilinear filtering) are looked up in a smaller texture or in a bigger one.

    [This message has been edited by muhkuh (edited 04-25-2002).]

  5. #5
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: Fillrate Question

    If you specify GL_LINEAR, OpenGL must pick up all texels that map to the pixel. In the case of a larger texture you might get 2 - 4 times more texels mapping to 1 pixel, hence more work. Thus larger textures should be slower.

    If you specify GL_NEAREST it should pick up only the texel closest to the the pixel. If it grabs the first texel it finds then I guess it should not matter. If it searches all texels that map to the pixels centre or something then its going to be slower for larger textures as it will have to search more texels per pixel. Check the specs to see which it is.

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    595

    Re: Fillrate Question

    it always takes more time to find a pixel in a big texture, thats why we have mipmaps, then the gfxchip can select the right size of the image before looking up the pixels.

  7. #7
    Member Newbie
    Join Date
    Apr 2002
    Location
    Berlin
    Posts
    49

    Re: Fillrate Question

    Are you sure about this ? I thought GL_LINEAR would always take 4 texels and compute a weighted avarage, no matter how big the texture is.

    Edit:
    Why should it take longer to find a texel in a larger texture ? It's just the same math going on. IMHO the reason for mip mapping is image quality.

    Edit2: from the MSDN
    GL_LINEAR
    Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured.

    [This message has been edited by muhkuh (edited 04-25-2002).]

  8. #8
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: Fillrate Question

    You are correct. In that case I'm at a loss. It may have something to do with whether the texture is resident in video memory or being pushed across the bus, but I know nothing of those matters.

  9. #9
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    477

    Re: Fillrate Question

    strange...,AFAIK things might be a little slower w/ a larger texture but certainly not 50fps slower.
    BTW:
    mipmapping has nothing to do w/ reducing texel lookup time(at least not that I know of) or anything.It's used to get rid of the aliasing caused by resampling the texture images.

  10. #10
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Fillrate Question

    Actually mip mapping will improve performance with minified textures because the implementation won't have to sample as many pixels. If the texture is minified lots of texels can contribute to a single pixel and thus lots of samples have to be made which slows things down. With mip maps the texels/pixel ratio is more constant and performance is increased.

Page 1 of 2 12 LastLast

Similar Threads

  1. Texture fillrate measurement
    By Efelante in forum OpenGL: Drivers
    Replies: 1
    Last Post: 10-10-2017, 01:10 PM
  2. Fillrate slowdown in my code, but not in another app
    By halo in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-29-2004, 04:07 PM
  3. Can early KIL (ARB FP) improve fillrate?
    By MZ in forum OpenGL: Advanced Coding
    Replies: 14
    Last Post: 03-18-2003, 09:50 PM
  4. Fillrate limitation
    By qonjure in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-24-2001, 08:08 AM
  5. Fillrate vs. Framerate
    By imported_Rob in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 04-15-2000, 01:19 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