• Advertisement
Sign in to follow this  

Simple doubt in a particle billboarding

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have 3 methods for aligning my particles to be facing the camera, basically, i want to know which is the fastest and the slowest among the 3, whenever i tried to test it out with LOTS of particles all 3 methods gave me the same frame rate when viewed in the same position, is it because all are as fast as eachother? if not, please tell me which is the fastest! the 3 methods are, ALL 3 work and align the particle properly to camera: 1) find inverse of modelview matrix, push a new matrix (not identity the previous modelview)on stack and multiply the inverse modelview matrix. 2) get the camera right, up and view vector and perform construct a matrix out of them and multiply that matrix, obviously after push a new matrix on stack, 3) get the correct coords of the quad of the particle via point0 = tPos + ((-refCam->Strafe() - refCam->UpVector()) * tSize ); point1 = tPos + (( refCam->Strafe() - refCam->UpVector()) * tSize ); point2 = tPos + (( refCam->Strafe() + refCam->UpVector()) * tSize ); point3 = tPos + ((-refCam->Strafe() + refCam->UpVector()) * tSize ); i hope the variable names are straight forward. also tell me why these ways don't show any performance difference. If the above ways are all slow please tell me the quickest possible correct way. Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement