Pointsprites per-point sizing

Started by
5 comments, last by J_Vitel 20 years, 4 months ago
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)
 
My site Jvitel.com
Advertisement
anyone?

Just wanna know if people working on Point sprites acomplished what they wanted.
My site Jvitel.com
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;
i know you all
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.
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.
My site Jvitel.com
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

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.
My site Jvitel.com

This topic is closed to new replies.

Advertisement