• Advertisement

Archived

This topic is now archived and is closed to further replies.

Pointsprites per-point sizing

This topic is 5212 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''ve been taking a look on point sprites, and made a search on this forum, but I still wonder if someone succeded on a particle system wich allows per-point sizing* (each vertex has its own size) as well as alpha blend and other issues related to particle systems, I''ve been trying doing this, but I got tired of point sprites, so I wonder if they''re worth. I''m using this FVF and the size parameter seems to be ignored all the time
struct POINTVERTEX
{
    D3DXVECTOR3 v;
    D3DXCOLOR color;
    FLOAT size;
};
#define D3DFVF_POINTVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_PSIZE)
 

Share this post


Link to post
Share on other sites
Advertisement
anyone?

Just wanna know if people working on Point sprites acomplished what they wanted.

Share this post


Link to post
Share on other sites
quote:
Original post by J_Vitel
anyone?

Just wanna know if people working on Point sprites acomplished what they wanted.


your struct data is wrong
check the d3d sdk for the order of the data;

Share this post


Link to post
Share on other sites
Are you trying in hardware or software? I ask becase I tried this in hardware then found out it wasn''t working because my GeForce 4 doesn''t support this type of operation.

Share this post


Link to post
Share on other sites
Thanks, now I can scale them, however the acceptable range is from 0.000f to 1.50f is this OK?, my d3dcapsviewer said my maximum Point Size was 64 (?) and the alpha component of my color is being ignored

this is my FVF

struct MyPOINTSPRITE
{
FLOAT x,y,z;
FLOAT size;
D3DCOLOR color;
};
#define D3DFVF_MyPOINTSPRITE (D3DFVF_XYZ|D3DFVF_PSIZE|D3DFVF_DIFFUSE)


and this are my render flags

m_pD3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
m_pD3DDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR );
m_pD3DDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_SRCALPHA );


thanks.

Share this post


Link to post
Share on other sites
What about the texture stage states?
Have you set your alpha op to "select arg 1", and your arg1 to be
"diffuse"?

In general, I suggest:
- Reading all the docs about point-sprites (and about everything you want to do, also)
- Taking a copy of the point-sprite sample that comes with the SDK and play with the code until you become familiar with how point-sprites work.

Muhammad Haggag

Share this post


Link to post
Share on other sites
Oh!, that''s right thanks, I usually read the doc. before asking in forums, but somethimes it seems like documentation is hard to understand, thanks.

Share this post


Link to post
Share on other sites

  • Advertisement