I'm not sure, I have no D3D9 project to test it with and see if it gives the correct results, which I'm still a bit unsure what they are =)
But try this:
GPRSize is the size the particle should have in worldspace.
D3DXVECTOR4 ParticleSystem::GetParticleRect(D3DXVECTOR3 GPRPos, FLOAT GPRSize){ D3DVIEWPORT9 VP; D3DXMATRIX View, Projection, Identity; D3DXVECTOR3 ParticlePos, TempSize1, ActualSize; D3DXVECTOR4 ParticleRectangle; FLOAT Left, Top, Right, Bottom; GameInformation.D3DDevice->GetTransform(D3DTS_VIEW, &View); GameInformation.D3DDevice->GetTransform(D3DTS_PROJECTION, &Projection); GameInformation.D3DDevice->GetViewport(&VP); D3DXMatrixIdentity(&Identity); D3DXVec3Project(&ParticlePos, &GPRPos, &VP, &Projection, &View, &Identity); // Replace the second Project with this... D3DXVECTOR4 TempSize4, TempSize42; D3DXVec3Transform(&TempSize4, &GPRPos, &View); TempSize4.x += GPRSize; TempSize4.y += GPRSize; D3DXVec4Transform(&TempSize42, &TempSize4, &Projection); TempSize1 = D3DXVECTOR3(TempSize42); // ActualSize.x = -(TempSize1.x - ParticlePos.x); ActualSize.y = -(TempSize1.y - ParticlePos.y); Left = ParticlePos.x - ActualSize.x; Top = ParticlePos.y - ActualSize.y; Right = ParticlePos.x + ActualSize.x; Bottom = ParticlePos.y + ActualSize.y; ParticleRectangle.w = Left; ParticleRectangle.x = Top; ParticleRectangle.y = Right; ParticleRectangle.z = Bottom; return ParticleRectangle;}