Archived

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

Pactuul

Point Sprite Error?

Recommended Posts

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