Skip to content

Conversation

@donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented Apr 2, 2023

Changes in this PR:

  • WebGLRenderer: Replaces .outputEncoding with .outputColorSpace
    • THREE.sRGBEncoding → THREE.SRGBColorSpace
    • THREE.LinearEncoding → THREE.LinearSRGBColorSpace

Remaining changes for r152, in next PRs:

Related issue:

@donmccurdy donmccurdy marked this pull request as draft April 2, 2023 22:57
@donmccurdy donmccurdy force-pushed the feat/webglrenderer-outputcolorspace branch from 983405d to cb6649a Compare April 3, 2023 00:17
@donmccurdy donmccurdy marked this pull request as ready for review April 3, 2023 00:23
@donmccurdy donmccurdy force-pushed the feat/webglrenderer-outputcolorspace branch from 21ed916 to cf48f01 Compare April 3, 2023 02:16
@donmccurdy
Copy link
Collaborator Author

@Mugen87 from #23614 (comment) I understand we may want to break this into two PRs:

  1. Rename .outputEncoding and update all references
  2. Change the default and update affected examples

I'll split the PR tomorrow, unless you or @mrdoob would prefer otherwise.

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 3, 2023

Yes, that would be great.

@Mugen87 Mugen87 added this to the r152 milestone Apr 3, 2023
@donmccurdy donmccurdy force-pushed the feat/webglrenderer-outputcolorspace branch from cf48f01 to 9c8e46c Compare April 3, 2023 13:09
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize Gzipped Diff from dev
627 kB 155.9 kB +400 B

🌳 Bundle size after tree-shaking

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

Filesize Gzipped Diff from dev
418.7 kB 102 kB +431 B

@donmccurdy donmccurdy changed the title WebGLRenderer: Rename .outputEncoding → .outputColorSpace, default to sRGB WebGLRenderer: Rename .outputEncoding → .outputColorSpace Apr 3, 2023
@donmccurdy
Copy link
Collaborator Author

@Mugen87 - done!

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 4, 2023

Merging this before even more conflicts occur.

@Mugen87 Mugen87 merged commit 88ade6a into mrdoob:dev Apr 4, 2023
@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 4, 2023

Feel free to improve the migration guide. I've just added a first draft: https://github.com/mrdoob/three.js/wiki/Migration-Guide

@donmccurdy donmccurdy changed the title WebGLRenderer: Rename .outputEncoding → .outputColorSpace WebGLRenderer: Replace .outputEncoding with .outputColorSpace Apr 4, 2023
@donmccurdy donmccurdy deleted the feat/webglrenderer-outputcolorspace branch April 4, 2023 13:51
@donmccurdy
Copy link
Collaborator Author

Thanks @Mugen87! I'll make suggestions on the migration guide after the next few PRs (or before r152, if the PRs slip).

@Methuselah96 Methuselah96 mentioned this pull request Apr 28, 2023
38 tasks
@938640624
Copy link

Hello, I'm going to the renderer. OutputEncoding = THREE. SRGBEncoding replace the renderer. OutputColorSpace = THREE. SRGBColorSpace, the effect is completely different, THREE. The effect of SRGBColorSpace added and not added is almost the same, should this be handled?

@donmccurdy
Copy link
Collaborator Author

Hi @938640624, please use the forums (https://discourse.threejs.org/) or Stack Overflow and provide enough context (demo or code) for someone to fully and immediately reproduce the issue you're seeing. The renaming of the property has no side effects, but you may be seeing the results of other changes in recent three.js versions, as described here. In any case we prefer to help you work through these questions outside of GitHub issues. Thanks!

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