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

WebGPURenderer: Fix color space of clear colors. #30488

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 9, 2025

Follow-up of #30485.

Description

Backend.getClearColor() must return the color in working color space.

@@ -64,14 +64,14 @@ class Background extends DataMap {

// no background settings, use clear color configuration from the renderer

renderer._clearColor.getRGB( _clearColor, LinearSRGBColorSpace );
renderer._clearColor.getRGB( _clearColor );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to not use LinearSRGBColorSpace and use the default ColorManagement.workingColorSpace which is LinearSRGBColorSpace.

@Mugen87 Mugen87 added this to the r174 milestone Feb 9, 2025
Copy link

github-actions bot commented Feb 9, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.28
78.27
336.28
78.27
+0 B
+0 B
WebGPU 517.85
143.85
517.81
143.84
-38 B
-9 B
WebGPU Nodes 517.31
143.74
517.27
143.73
-38 B
-9 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.32
112.14
465.32
112.14
+0 B
+0 B
WebGPU 589.74
160.03
589.7
160
-38 B
-24 B
WebGPU Nodes 545.11
149.5
545.07
149.5
-38 B
-9 B

@Mugen87 Mugen87 merged commit 7e366d0 into mrdoob:dev Feb 9, 2025
12 checks passed
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.

1 participant