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

Use a consistent scale factor and resolution in stress tests #10474

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Nov 9, 2023

Objective

Related to #10472.

Not having a hardcoded scale factor makes comparing results from these stress tests difficult.

Contributors using high dpi screens may be rendering 4x as many pixels as others (or more). Stress tests may have different behavior when moved from one monitor in a dual setup to another. At very large resolutions, different parts of the engine / hardware are being stressed.

1080p is also a far more common resolution for gaming.

Solution

Use a consistent 1080p with scale_factor_override: 1.0 everywhere.

In #9903, this sort of change was added specifically to bevymark and many_cubes but it makes sense to do it everywhere.

Discussion

  • Maybe we should have a command line option, environment variable, or CI_TESTING_CONFIG option for 1080p / 1440p / 4k.

  • Will these look odd (small text?) when screenshotted and shown in the example showcase? The aspect ratio is the same, but they will be downscaled from 1080p instead of ~720p.

  • Maybe there are other window properties that should be consistent across stress tests. e.g. resizable: false.

  • Should we add a stress_test_window(title) helper or something?

  • Bevymark (pre-10472) was intentionally 800x600 to match "bunnymark", I believe. I don't personally think this is very important.

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples C-Code-Quality A section of code that is hard to understand or change labels Nov 9, 2023
@alice-i-cecile
Copy link
Member

Maybe we should have a command line option, environment variable, or CI_TESTING_CONFIG option for 1080p / 1440p / 4k.

Yes, but in a follow-up PR :)

Should we add a stress_test_window(title) helper or something?

If we're able to deduplicate more code than just that into a common helper file, sure.

@ickshonpe
Copy link
Contributor

Yeah, agree with this.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 9, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 9, 2023
Merged via the queue into bevyengine:main with commit cbadc31 Nov 9, 2023
26 checks passed
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
…ine#10474)

# Objective

Related to bevyengine#10472.

Not having a hardcoded scale factor makes comparing results from these
stress tests difficult.

Contributors using high dpi screens may be rendering 4x as many pixels
as others (or more). Stress tests may have different behavior when moved
from one monitor in a dual setup to another. At very high resolutions,
different parts of the engine / hardware are being stressed.

1080p is also a far more common resolution for gaming.

## Solution

Use a consistent 1080p with `scale_factor_override: 1.0` everywhere.

In bevyengine#9903, this sort of change was added specifically to `bevymark` and
`many_cubes` but it makes sense to do it everywhere.

## Discussion

- Maybe we should have a command line option, environment variable, or
`CI_TESTING_CONFIG` option for 1080p / 1440p / 4k.

- Will these look odd (small text?) when screenshotted and shown in the
example showcase? The aspect ratio is the same, but they will be
downscaled from 1080p instead of ~720p.

- Maybe there are other window properties that should be consistent
across stress tests. e.g. `resizable: false`.

- Should we add a `stress_test_window(title)` helper or something?

- Bevymark (pre-10472) was intentionally 800x600 to match "bunnymark", I
believe. I don't personally think this is very important.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants