Sign in to follow this  
Lord_Jekky

point sprites problem

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this