PDA

View Full Version : GL_ARB_point_sprite problem



ox1d_47
05-05-2004, 12:52 PM
Hi, i'm new here.
I have i little(or big) problem with the ARB_point_sprite extension.
I just bought a new graphics card (an ati radeon 9600xt) and when i ran my program with that new card and a point-sprite came into my view the whole texture coords of all the other textured primitives were "damaged"(it looked like that). With my old card i did not have that bug. I searched the net for that problem .. no success. Might i have overlooked something? I also tried a point-sprite tutorial program. The same problems appeared.

Any suggestions?

ox1d_47

dorbie
05-05-2004, 01:03 PM
Try loading an identity matrix onto the texture matrix stack when you're done with the sprites. It shouldn't be required but there may be a bug. Texgen may be the other potential culprit so maybe try disabling that. Again none of this should be broken so it's a long shot. That's the kind of state that can stuff up your texture.

Eric Lengyel
05-05-2004, 03:35 PM
I have also experienced this problem. I filed a bug with ATI about a month ago and discussed it with one of their developer relations people, but they have yet to acknowledge it as the fault of their driver.

ox1d_47
05-06-2004, 02:23 AM
Thanks for the information. I hope that they are working on it.
Did they tell you how to fix the problem temporarily?

ox1d_47

Eric Lengyel
05-06-2004, 12:04 PM
No. As far as I know, the only way to fix the problem is to disable point sprites.

Jared
05-07-2004, 08:44 AM
few details:

-enabling ps and/or texcoord generation doesnt hurt.. until you actually draw a sprite.
-restoring the texture matrix and pretty much all attributes opengl has to offer doesnt help.
-using point sprites with va or vbo in my case didnt generate correct tex coords (or none at all, hard to tell)
-using vertex pointer and color pointer (or other vertex attrib pointers) caused vpu to crash

personal result:
-ps support on ati is a bad joke that looks like it never was touched by qa

good news:
-according to a post on gamedev the texture warping will be fixed in cat 4.6 (any maybe some of the other problems if im really lucky)

until then i use this vertex program:
-normal is actually the sprite position
-texcoord is the x,y size for the sprite
-position are signs (-.5 | 5) that specify the corner

!!ARBvp1.0

PARAM ModProj[4] = {state.matrix.mvp};

TEMP pos, res;
MOV pos, vertex.normal;
MOV pos.w, 1;
DP4 res.x, ModProj[0], pos;
DP4 res.y, ModProj[1], pos;
DP4 res.z, ModProj[2], pos;
DP4 res.w, ModProj[3], pos;

MOV result.position, res;
MAD result.position.xy, vertex.position, vertex.texcoord[0], res;
ADD result.texcoord[0], vertex.position, {.5,.5,0,0};
MOV result.color, vertex.color;

END

to render:
glTexCoord2fv(Particles[i].Size);
glColor4fv(Particles[i].Col);
glNormal3fv(Particles[i].Pos);
glVertex2f(-.5f,-.5f);
glVertex2f(.5f,-.5f);
glVertex2f(.5f,.5f);
glVertex2f(-.5f,.5f);

only half the speed of point sprites (but allows for non square particles). basically its simply avoiding a lot of math by doing the work after the projection instead of fooling around with camera up and right vectors.

ox1d_47
05-07-2004, 11:36 AM
Thank you very much! I'll try your code.
ATI, what are you doing? I am really disappointed.

ox1d_47