Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter_14/ParticleSystemTransformFeedback/ParticleSystemTransformFeedback.c line169 #44

Open
huakaitingqian opened this issue May 25, 2017 · 0 comments

Comments

@huakaitingqian
Copy link

i can't understand the line 169,170.
the "lifetime" variable is always minus, there is no use deciding "lifetime <=0.0"
the code:

 float lifetime = a_curtime - u_time; 
 if( lifetime <= 0.0 && randomValue(seed) < u_emissionRate )
 {  
 }

i think it may be the following code, to decide whether the particle has
expired.
float lifetime = a_lifetime - (u_time - a_curtime);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant