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

WebGLRenderer: Remove unnecessary __hasExternalTextures check. #27684

Merged
merged 4 commits into from
Feb 5, 2024
Merged

WebGLRenderer: Remove unnecessary __hasExternalTextures check. #27684

merged 4 commits into from
Feb 5, 2024

Conversation

susiwen8
Copy link
Contributor

@susiwen8 susiwen8 commented Feb 5, 2024

Description

renderTargetProperties.__hasExternalTextures is set be true just one line above if statement, so I think if can be removed.

Also move some variables to proper place.

Copy link

github-actions bot commented Feb 5, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
675.9 kB (167.9 kB) 675.8 kB (167.9 kB) -27 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
456.4 kB (110.7 kB) 456.4 kB (110.7 kB) -27 B

@Mugen87 Mugen87 added this to the r162 milestone Feb 5, 2024
@Mugen87 Mugen87 changed the title fix: remove unnecessasy if statement WebGLRenderer: Remove unnecessary __hasExternalTextures check. Feb 5, 2024
@Mugen87 Mugen87 merged commit 86a94fd into mrdoob:dev Feb 5, 2024
12 checks passed
@susiwen8 susiwen8 deleted the variable branch February 5, 2024 12:20
@susiwen8
Copy link
Contributor Author

susiwen8 commented Feb 5, 2024

@Mugen87 I have question about __useRenderToTexture
image
Looks like __useRenderToTexture would never set be be true. useMultisampledRTT always returns false. Am i missing something?

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 5, 2024

WEBGL_multisampled_render_to_texture is XR related code. I'm not sure about this bit so this should be reviewed from @cabanier.

@cabanier
Copy link
Contributor

cabanier commented Feb 5, 2024

WEBGL_multisampled_render_to_texture is XR related code. I'm not sure about this bit so this should be reviewed from @cabanier.

That code is used in other places so it's needed. Specifically, if an experience passes a color and depth buffer and tries to use this extension, we will disable the extension and print this warning.

@cabanier
Copy link
Contributor

cabanier commented Feb 5, 2024

Looks like __useRenderToTexture would never set be be true. useMultisampledRTT always returns false. Am i missing something?

That extension is supported by the Quest (and possibly Pico) browser to do efficient multisampled rendering

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.

4 participants