Jump to content
  • Advertisement
Sign in to follow this  
Tinyn

Point Sprites and texture coords.

This topic is 4027 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this texture, it consists of an 8x8 grid of slightly different cloud puffs. For my particles I'm supposed to randomly assign each new particle one of the different puffs randomly. I'm trying to use GL_ARB_point_sprite, but when using this feature, it seems to always always use texture coords 0.0 to 1.0, and there is no way for me to specify "No, use 0.125,0.125 to 0.25,0.25". Its even ignoring the texture matrix.
glMatrixMode(GL_TEXTURE);
glPushMatrix();
glScalef(0.125f, 0.125f, 1.0f);
glTranslatef(0.125f, 0.25f, 1.0f);
glMatrixMode(GL_MODELVIEW);
has no affect at all. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
AFAIK there is no way of specifing other texturecoordinates for point sprites. There are also lots of other restrictions on point sprites. Because of this most people use billboarded quads for particle rendering.

Share this post


Link to post
Share on other sites
Well, where there isn't a normal way, theres always ARBfp.


!!ARBfp1.0
PARAM OFFSET = program.local[0];
PARAM SIZE = program.local[1];
TEMP COORD;
TEMP TEXCLR;
MAD COORD, SIZE, fragment.texcoord[0], OFFSET;
TEX TEXCLR, COORD, texture[0], 2D;
MUL result.color, TEXCLR, fragment.color.primary;
END

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!