Skip to content

WebGPURenderer: Fix color space of clear colors.#30488

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev3
Feb 9, 2025
Merged

WebGPURenderer: Fix color space of clear colors.#30488
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev3

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.

// 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
@github-actions
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