Simple doubt in a particle billboarding

Started by
-1 comments, last by tenmar 18 years ago
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!

This topic is closed to new replies.

Advertisement