Archived

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

Pactuul

Point Sprite Error?

Recommended Posts

Pactuul    122
Well I did have a working particle engine going using directx 8.0 point sprites...I''ve rewrote the thing to use in directx 8.1 (not much changed actually) Well the problem it seems is that it renders all the particles at the right spot and everything but the sprites are stretched all in one direction to infinitity...So I thought well that looks like something in the vertex buffer is reading out of bounds...but it''s all legit as far as i can. As anyone come across this problem before these things? Pactuul

Share this post


Link to post
Share on other sites
jollyjeffers    1570
aX+bY+cZ+d=0 is the plane equation, if I''m correct, a-b-c are the x,y,z cross product values for the triangle/point/whatver that the plane was generated from... so just normalise them and you''ll get the normal...

if that''s not mathematically sound, I know I can generate a plane with that equation (from a triangle) making [a,b,c]=[x,y,z] of the cross product (and d=-DP(cross,v0) )

as for the psprites, never had that problem.

hth
Jack;

Share this post


Link to post
Share on other sites
Pactuul    122
Yeah I the pointsprites use the same technique to generate them. and you can adjust a, b, and c to get different effects and sizes, but it still does the strewing out to infinity thing.

I then thought it was my viewport or something, but that''s correct also... arrggh very irritating problem.

Share this post


Link to post
Share on other sites
Pactuul    122
Ok when I run this thing in REF mode, it slow, but it runs correctly, when i switch it back to HAL it''s big particles again....I''m GOING INSANE....

Share this post


Link to post
Share on other sites
Pactuul    122
Ok I found the problem.....
Thank GOD...

The structure for my Point was off..I had a pointsize variable that it was reading wrong, I fixed that and now it works!

Share this post


Link to post
Share on other sites