Jump to content
  • Advertisement
Sign in to follow this  
Lord_Jekky

point sprites problem

This topic is 3055 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

Since i'm using managed directx, i'm not really sure if i should ask this here or in the .NET forum, so sorry if this is the wrong place. I'm using point sprties to render particles - the trouble is that i can't get them to scale at all. Based on the info i've read in the docs/found on the net, i've set the PointSpriteEnable and PointScaleEnable render states both to true and i've set the PointSizeMin, PointSizeMax and PointSize states to 1, 100 and 50 respectively. I've tried dozens of different values for PointScaleA, PointScaleB and PointScaleC - but no matter what i set, it draws every sprite at the exact size specified by PointSize (or at least that's how it seems) and nothing else regardless of camera distance. So, my questions: 1: Should i have set pointsize at all? 2: did i miss a state somewhere? 3: could the fact that i use a shader for the rendering be causing this problem? 4: should i simply not be using point sprites, is there a better way to get particles?

Share this post


Link to post
Share on other sites
Advertisement
It's better to make quads as point sprites are notorious for driver issues, one of which you might be experiencing yourself.

You can expand the positions of the corners in a VS if you don't want to do any camera-alignment math on the cpu as you build your list.

There are a variety of ways of doing that, but I tend to pack a code [-1,+1], [+1,+1], [etc] in a texture coordinate in the verts then scale in those directions in camera space. Works nice and gets off the cpu asap

Share this post


Link to post
Share on other sites
I suspected that the answer was going to be to drop the point sprites.. they seem to be a lot of trouble to work with.

Thanks for the info, i'll give it a go that way then.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!