Skip to content

particles sorting, "Shaken, not stirred"#9

Open
kutu wants to merge 1 commit into
Gamua:masterfrom
kutu:particlesSorting
Open

particles sorting, "Shaken, not stirred"#9
kutu wants to merge 1 commit into
Gamua:masterfrom
kutu:particlesSorting

Conversation

@kutu

@kutu kutu commented Oct 27, 2012

Copy link
Copy Markdown
Contributor

if i want to do trail effect, but some new initialized particles rendered under oldest

white rectangle is a head

before

after

@PrimaryFeather

Copy link
Copy Markdown
Contributor

Hm ... I see what you mean, but this will have performance implications. First, depending on how the vector class works internally, "splice" will have to move all indices above the current index "down". Furthermore, the method creates a temporary object each time it is called (the return vector).

So I'm not super happy about the implications this has -- especially on those particle systems that don't care about the sorting.

But we could make this an optional feature; a property that controls that behavior ... we'd need a good name for that, though. Any ideas?

@kutu

kutu commented Oct 29, 2012

Copy link
Copy Markdown
Contributor Author

name it how you like it
maybe add new boolean parameter to the end of constructor with default value to false

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

Successfully merging this pull request may close these issues.

2 participants