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

Exposes framebufferScaleFactor to EngineOptions #12422

Closed
wants to merge 2 commits into from

Conversation

imerso
Copy link

@imerso imerso commented Apr 21, 2022

This change allows the engine user to adjust framebufferScaleFactor on engine creation. This option will allow to reduce resolution in XR mode. For devices like the Oculus Quest, that is imho a very important option.

@azure-pipelines
Copy link

Please make sure to tag your PR with "bug", "new feature" or "breaking change" tags.

@azure-pipelines
Copy link

Snapshot stored with reference name:
refs/pull/12422/merge

Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12422/merge/index.html

To test a playground add it to the URL, for example:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12422/merge/index.html#WGZLGJ#4600

To test the snapshot in the playground itself use (for example):

https://playground.babylonjs.com/?snapshot=refs/pull/12422/merge#BCU1XR#0

@azure-pipelines
Copy link

Please make sure to tag your PR with "bug", "new feature" or "breaking change" tags.

@azure-pipelines
Copy link

Snapshot stored with reference name:
refs/pull/12422/merge

Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12422/merge/index.html

To test a playground add it to the URL, for example:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12422/merge/index.html#WGZLGJ#4600

To test the snapshot in the playground itself use (for example):

https://playground.babylonjs.com/?snapshot=refs/pull/12422/merge#BCU1XR#0

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I agree, it is an important option.

This is already possible using the canvas options provided to the default experience helper (if you are using it), or providing the option directly when creating the experience yourself.

For example:

await scene.createDefaultXRExperienceAsync({
  outputCanvasOptions: {
    canvasOptions: {
      framebufferScaleFactor: aValueOtherThan1
    }
  }
});

If that doesn't work it's a bug, but there is no need to add this (XR specific) feature to the thin engine.

@RaananW RaananW closed this Apr 25, 2022
@imerso
Copy link
Author

imerso commented Apr 25, 2022

That works perfectly, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants