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

3.0 Particles Shader: impossible to calculate current lifetime #11538

Closed
curly-brace opened this issue Sep 24, 2017 · 4 comments
Closed

3.0 Particles Shader: impossible to calculate current lifetime #11538

curly-brace opened this issue Sep 24, 2017 · 4 comments

Comments

@curly-brace
Copy link

curly-brace commented Sep 24, 2017

i mean the value that increases over lifetime

for example it could be used to calculate color over lifetime using gradient texture

but there is no values that change themselves

LIFETIME just holds the lifetime max

@curly-brace
Copy link
Author

but i could be wrong tho. because now i've understood that CUSTOM vector is persistent during particle lifetime and could be updated with DELTA

but it is not very intuitive solution, may be it would be better to add some variable that is [0..1] range and updates automagically.

@eon-s
Copy link
Contributor

eon-s commented Sep 24, 2017

LIFETIME is the emitter parameter, not the time-of-life of the particle, is not too clear and not very useful (but INDEX is worse because it gets reset making harder to do complex effects).

And yes, you can store deltas in CUSTOM (vec4), is limited but may be enough for most uses, I guess.

@curly-brace
Copy link
Author

yeah i understand what LIFETIME is, but using CUSTOM is a bit strange imo

@KoBeWi
Copy link
Member

KoBeWi commented May 25, 2019

Somewhere since 3.0, CUSTOM.y is the automatically updated 0...1 value for current lifetime. It is even stated so in Shading Language doc.

Closing as resolved.

@KoBeWi KoBeWi closed this as completed May 25, 2019
@KoBeWi KoBeWi added this to the 3.0 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants