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

webgl_teapot samples render at wrong resolution in Firefox #1415

Open
3 tasks done
hobzcalvin opened this issue Jan 27, 2021 · 4 comments
Open
3 tasks done

webgl_teapot samples render at wrong resolution in Firefox #1415

hobzcalvin opened this issue Jan 27, 2021 · 4 comments

Comments

@hobzcalvin
Copy link

Please read first!

Please use discuss-webrtc for general technical discussions and questions.

  • I have provided steps to reproduce
  • I have provided browser name and version
  • I have provided a link to the sample here or a modified version thereof

Browser affected

Firefox 85.0 (64-bit)

Description

Samples using the shiny webgl teapot render the teapot off-center and too big: it looks like width/height are being doubled or halved somewhere in the process so we're seeing the lower-left quadrant of the teapot render instead of the full view.
I'm on a macOS machine with window.devicePixelRatio = 2 which might be causing the issue, but changing the DPR in Responsive Design Mode doesn't change the behavior. Looks fine on Chrome 88.0.4324.96 (Official Build) (x86_64) and Safari.

Steps to reproduce

Visit
https://webrtc.github.io/samples/src/content/capture/canvas-pc/
https://webrtc.github.io/samples/src/content/capture/canvas-record/ or
https://webrtc.github.io/samples/src/content/capture/canvas-video/
in Firefox.

Expected results

Properly sized and centered view of the shiny teapot is displayed on the canvas.

Actual results

Oversized lower-left quadrant view of the shiny teapot is displayed on the canvas.

Screen Shot 2021-01-27 at 11 24 37 AM

@hobzcalvin
Copy link
Author

The problem seems to be in the call to canvas.captureStream(). Before it is called, the teapot looks (and moves around by dragging) just fine. After canvas.captureStream() is called, the next time a frame is drawn (by dragging the mouse over the teapot) the canvas viewport suddenly breaks.

@fippo
Copy link
Collaborator

fippo commented Feb 5, 2021

tagging @jan-ivar for triage

@hobzcalvin
Copy link
Author

I think this is actually a Firefox bug, whenever captureStream() is called on a WebGL Canvas: https://bugzilla.mozilla.org/show_bug.cgi?id=1689479

@vitaly-castLabs
Copy link

Imo even though it looks cool, the whole teapot thing should be removed - it's a very complex thing which has nothing to do with webrtc. I couldn't agree with this statement more: #1657 (comment)

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

No branches or pull requests

3 participants