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

ARCanvas is pixelated #90

Closed
JakeJustLearning opened this issue Sep 24, 2021 · 1 comment
Closed

ARCanvas is pixelated #90

JakeJustLearning opened this issue Sep 24, 2021 · 1 comment
Labels
question A general question or query about WebXR or react-xr

Comments

@JakeJustLearning
Copy link

I have the following two repos and associated github pages that show building nearly the same thing in three.js/webxr and react-xr and three-fiber.

In react-three-fiber/xr the AR Canvas is rendering everything in a very pixelated form.
this component is where I am initiated my ARCanvas in React which is having pixelation issues

and this is the basic three and webxr where I initiate my scene and do not have any pixelation problems.

Can someone please help me understand what configuration I am missing in my react version to prevent pixelation?

The device I use is an iphone XS with the XR viewer app.

@mwmwmw
Copy link
Contributor

mwmwmw commented Sep 29, 2021

I think your ARCanvas repo is set to private, so I can't see it.

My gut instinct based on what you've described says that you're having a DPI scaling issue.

You can set the DPI for your canvas with <ARCanvas dpr={window.devicePixelRatio} />

Also, double check your public/index.html file and make sure this is in the header

  <meta
	  name="viewport"
	  content="width=device-width, initial-scale=1, shrink-to-fit=no"
  />

[Edited to provide correct param to canvas]

@CodyJasonBennett CodyJasonBennett added the question A general question or query about WebXR or react-xr label Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A general question or query about WebXR or react-xr
Projects
None yet
Development

No branches or pull requests

3 participants