Fill Rate will kill me

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.

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

Many thanks for any help !!!

Astro

Could you post some code first?

Ok, here’s some code.

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

// I use a float pbuffer as a texture

glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_RECTANGLE_NV, m_pbuffer_tex);
m_pbuffer->Bind(WGL_FRONT_LEFT_ARB);

// asimple pass through prog to render the float texture

cgGLBindProgram(m_CGrender);
cgGLEnableProfile(CG_PROFILE_FP30);

// 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

glBegin(GL_QUADS);
 glTexCoord2f(0.0f, 0.0f);
 glVertex3f(_x, _y , _z);
 glTexCoord2f(m_w, 0.0f);
 glVertex3f(_x+_w,_y,_z);
 glTexCoord2f(m_w,m_h);
 glVertex3f(_x+_w,_y+_h,_z);
 glTexCoord2f(0.0f, m_h);
 glVertex3f(_x,_y+_h,_z);
glEnd();

cgGLDisableProfile(CG_PROFILE_FP30);

m_pbuffer->Release(WGL_FRONT_LEFT_ARB);
glDisable( GL_BLEND );

I can post any other info other thing if needed…

Astro

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.

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 !

Astro