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

WebGLBackend: Update viewport state #30337

Merged
merged 2 commits into from
Jan 16, 2025
Merged

WebGLBackend: Update viewport state #30337

merged 2 commits into from
Jan 16, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jan 16, 2025

Related issue: #30313

Description

Update viewport using state after #30329

@sunag sunag added this to the r173 milestone Jan 16, 2025
Copy link

github-actions bot commented Jan 16, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.53
79.09
339.53
79.09
+0 B
+0 B
WebGPU 493.61
137.21
493.58
137.21
-34 B
-2 B
WebGPU Nodes 493.08
137.1
493.05
137.1
-34 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.41
112.16
465.41
112.16
+0 B
+0 B
WebGPU 564.15
152.87
564.11
152.87
-35 B
-3 B
WebGPU Nodes 519.53
142.45
519.5
142.44
-35 B
-3 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 16, 2025

const viewport = this._tempScissor.set( x, y, width, height );

Nit: The line should use _tempViewport and not _tempScissor. Unfortunately, not the root cause of our issue.

@sunag sunag marked this pull request as ready for review January 16, 2025 16:13
@sunag
Copy link
Collaborator Author

sunag commented Jan 16, 2025

It's work for me now on Windows

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 16, 2025

Still no luck on macOS.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 16, 2025

I've tried to integrate the latest changes in the XRManager but Quest browser reports this WebGL error:

[.WebGL-0x6a00132900]GL ERROR :GL_INVALID_OPERATION : glDrawElements: uniform buffers : buffer or buffer range at index 2 not large enough

Maybe the issue on macOS is related to this message.

In the XR demo webgpu_xr_cubes , no 3D objects get rendered so far during a XR session.

@Mugen87 Mugen87 merged commit 785add5 into mrdoob:dev Jan 16, 2025
12 checks passed
@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 16, 2025

Merging this in the meanwhile to fix at least Windows devices and the CI.

@sunag
Copy link
Collaborator Author

sunag commented Jan 16, 2025

I'm checking, it seems to be related to the pixel ratio

@sunag sunag deleted the dev-state branch January 16, 2025 18:04
@RenaudRohlinger
Copy link
Collaborator

Oops sorry I missed that one. 🙇

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

Successfully merging this pull request may close these issues.

3 participants