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

VideoTexture: Restore inline sRGB decode. #26521

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 1, 2023

Fixed #26516.
Fixed #26183.

Description

Because of the broken SRGB8_ALPHA8 support for video textures in Webkit and a Chromium performance issue (https://bugs.chromium.org/p/chromium/issues/detail?id=1451195) this PR adds the inline sRGB decode for video textures back to the engine (meaning it reverts #25752).

We can reconsider the usage of SRGB8_ALPHA8 for video textures when the browser issues are going to be fixed.

@Mugen87 Mugen87 added this to the r156 milestone Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
645.2 kB (159.9 kB) 646 kB (160.2 kB) +793 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
438.3 kB (106 kB) 439.1 kB (106.3 kB) +795 B

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 2, 2023

This PR also fixed a memory leak in Firefox, see #26527.

Browser devs should really revisit their SRGB8_ALPHA8 implementation. Webkit, Chromium and Firefox all have issues at the moment 😞 .

@danrossi
Copy link

danrossi commented Aug 2, 2023

Confirmed I can leave the texture as

texture.colorSpace = SRGBColorSpace;

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 2, 2023

You definitely need this line otherwise there is no sRGB decode.

@cyango
Copy link

cyango commented Aug 11, 2023

With this line of code on my react three fiber app, this seriously affects FPS in android. Not iOS nor desktop.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 11, 2023

You might have to wait until r156 is released.

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