-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fix trail overlap #6274
base: master
Are you sure you want to change the base?
Fix trail overlap #6274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (except for the thing already flagged by the CI), but I've had too much of a hand in this already to be comfortable giving the only approval for a merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very nervous about introducing significant performance burdens on situations which otherwise would not have needed to worry about this issue at all, and don't benefit from it much.
If this symptom is what I think it is, it really should only be noticeable by the player in close proximity, in which case, since this geometry is being produced on the fly, why not only introduce these extra tris when near to the current eye position? That way scenes with lots of distant long and straight trails would be basically unaffected.
This makes a change to the way trails are rendered in order to remedy an issue where trail segments would visibly "overlap" with themselves when twisted. It does this by increasing the number of tris in each segment from 2 to 4. This appears to have a significant performance impact in very trail-heavy scenarios, so the change only takes effect when particle detail is set to max. (I would be entirely willing to switch it to a different detail setting, like model, if that's deemed more appropriate.)
More profiling would be useful in future to figure out exactly where the performance drop is coming from, but for now, under typical circumstances, it should be fine.