#### Archived

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

# Pointsprites per-point sizing

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

## 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 on other sites
anyone?

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

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

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

check the d3d sdk for the order of the data;

##### 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 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 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:
- 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.

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

• 9
• 9
• 13
• 41
• 15