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

perf(rendering): use MONO rendering stage #5160

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

skaldarnar
Copy link
Member

Contains

Use the MONO rendering stage in a single rendering pass instead of two rendering passes for the LEFT_EYE and RIGHT_EYE.

I believe this is a left-over/bug from removing VR support. In previous revisions, the MONO stage was used when not supporting VR.

if (!context.get(Config.class).getRendering().isVrSupport()) {
worldRenderer.render(RenderingStage.MONO);
} else {
worldRenderer.render(RenderingStage.LEFT_EYE);
worldRenderer.render(RenderingStage.RIGHT_EYE);
}

How to test

Run the game and check for any rendering quirks.

The game should run a bit smoother (some rough profiling suggests that the second rendering pass accounted for 25% of the total rendering time).

Outstanding before merging

n/a

@skaldarnar skaldarnar added this to the 2023 Revive - Milestone 2 milestone Nov 3, 2023
@skaldarnar skaldarnar added Category: Performance Requests, Issues and Changes targeting performance Topic: Rendering Requests, Issues and Changes related to lighting, meshes, camera, etc. labels Nov 3, 2023
Copy link
Contributor

@BenjaminAmos BenjaminAmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does appears to reduce the worst-case rendering times by around half. I did not notice any additional rendering issues in-game (although this does not in itself solve the stuttering problem).

@skaldarnar skaldarnar merged commit d3bbd77 into develop Nov 5, 2023
21 checks passed
@skaldarnar skaldarnar deleted the perf/mono-rendering-stage branch November 5, 2023 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Performance Requests, Issues and Changes targeting performance Topic: Rendering Requests, Issues and Changes related to lighting, meshes, camera, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants