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

Render lines using SpriteRenderer without breaking the batch. #15149

Merged
merged 1 commit into from May 23, 2018

Conversation

Projects
None yet
4 participants
@pchote
Copy link
Member

pchote commented May 19, 2018

This PR removes the separate color shader, and instead handles it as a special case of the sprite renderer. This avoids the shader switch when rendering projectiles and other contrails in RA and TD, saving several tens of ms render time (the difference between completely unplayable and kind of okay) during battles on a Raspberry Pi.

@pchote pchote requested a review from chrisforbes May 19, 2018

@pchote pchote force-pushed the pchote:merge-linerenderer branch from a9373ab to 5cb7acd May 19, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented May 20, 2018

I've only tested this combined with #15148 so far, but even on a GTX 1070 the best-case gains on the RA shellmap reach around 4ms in heavy scenes (~9ms on pre-15148-bleed vs. 5ms with both PRs), and of particular notice is how the batches count stays almost completely flat at a low ~32-33 all the time vs. fluctuating wildly between ~60 and ~140 depending on the amount of on-screen contrails etc.
I'll hold off from approving for now until hopefully someone approves the code. :+0.5: for now.

@abcdefg30 abcdefg30 merged commit a329711 into OpenRA:bleed May 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abcdefg30

This comment has been minimized.

Copy link
Member

abcdefg30 commented May 23, 2018

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented May 27, 2018

Out of curiosity, should this have a positive effect on laser beam render performance as well?
Because I don't see a (noticable) difference in my local testing.

Edit: Tested again and I actually do see a difference, just not as large as expected and not as obvious as in RA. Might be because I'm still at 5 sheets (17 pngs).

@pchote pchote deleted the pchote:merge-linerenderer branch Jul 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.