View Full Version : Fill Rate will kill me

10-24-2003, 10:50 AM
Hello there,

I'm rendering a textured quad with a simple
32*32 tex with alpha channel on.
When this quad covers half the screen, my
framerate drops to 1 !!!!

Surely the problem lies wihtin the fillrate,
but I'd like to know if you don't have a trick to help me with this.

quadro 4,
Filtering on GL_NEAREST,
Blend function GL_SRC_ALPHA, GL_ONE

Many thanks for any help !!!!


10-24-2003, 10:58 AM
Could you post some code first?

10-24-2003, 11:05 AM
Ok, here's some code.

// enable blending
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE );

// I use a float pbuffer as a texture

glBindTexture(GL_TEXTURE_RECTANGLE_NV, m_pbuffer_tex);

// asimple pass through prog to render the float texture


// the quad

// note m_w and m_h are the size of my tex
// here 32*32

// x, y , z the pos of the first corner,
// and w and h the dimension of the tex

glTexCoord2f(0.0f, 0.0f);
glVertex3f(_x, _y , _z);
glTexCoord2f(m_w, 0.0f);
glTexCoord2f(0.0f, m_h);


glDisable( GL_BLEND );

I can post any other info other thing if needed....


10-24-2003, 01:13 PM
I see you're using CG. There is a chance that your fragment program is eating up all your fill. Have you tried just simply returning a color value in the fragment program (and doing nothing else) just to make sure your fragment program isnt eating all that fillrate.

After that, uh, I guess you can try killing the blending but I don't think that's whats hurting your FPS... I honestly think that its the fragment program.

10-24-2003, 05:45 PM
Ok maybe this is something I should
have written before....

I'm using float pbuffer, and as far as the
quadro 4 I'm using doesn't support this,
I'm using NV30emulation....

The fragment program I'm using is nothing
but a fetch on the texture.

I was thinking that maybe It could be the problem,
but when I resize my window the FPS goes better (for a very small window, the fps
is about 20 fps). That why I suppose
fillrate has smthg to do with it.

But on the other hand, maybe the pixel
shader is called for all the pixels,
and not only for all the texels (i.e.
not only 32*32 times, but number_of_pixels
_in_the_viewport_involved_in_the_tex times)
Maybe someone knows about this ?

Thx for all the contributions !