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

Fix trail overlap #6274

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Kestrellius
Copy link
Contributor

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.

Copy link
Member

@BMagnu BMagnu left a 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

Copy link
Member

@Baezon Baezon left a 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.

@wookieejedi wookieejedi added the discussion This issue has (or wants) a discussion label Jul 28, 2024
@Goober5000 Goober5000 added the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Aug 27, 2024
@Kestrellius Kestrellius marked this pull request as draft September 7, 2024 17:54
@Goober5000 Goober5000 removed the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue has (or wants) a discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants