question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Second pass in composer breaks sRGBEncoding (darkens objects)

See original GitHub issue

If you set renderer.outputEncoding = THREE.sRGBEncoding and you use an EffectComposer with more than one pass to render the scene colors appear as they would without sRGBEncoding.

Here is a fiddle demonstrating the problem. https://jsfiddle.net/cvumeLpx/2/

Comment out the second composer.addPass(renderPass); and colors will render as expected.

The second pass can be anything https://jsfiddle.net/cvumeLpx.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mrdoobcommented, Jan 23, 2020

You know… I think the actual issue here is the API. It’s “forcing” users to learn about color spaces when using post-processing.

That’s why I was considering something like https://github.com/mrdoob/three.js/pull/18322 so the renderer can take care of color spaces for the user.

1reaction
WestLangleycommented, Jan 22, 2020

@Mugen87 said

I will not refer to any statements of the delicate @WestLangley anymore…

@Mugen87 Please refrain from making personal attacks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: sRGBPass for EffectComposer · Issue #18468
I'm in need of a post process pass that does the same thing as ... Second pass in composer breaks sRGBEncoding (darkens objects)...
Read more >
three.js - EffectComposer second pass "overwrites" first pass
i want to render a texture on the background and the 3dscene in the foreground. i used the effectcomposer to do this. how...
Read more >
Effect Composer Gamma Output Difference - three.js forum
So basically Im running into an issue where Im getting an inferior result using EffectComposer . Renderer + .outputEncoding = THREE.sRGBEncoding : (correct)....
Read more >
Real-Time Rendering Fourth Edition
Each passes the result to the next person in line and immediately starts work on the next sandwich. If each person takes twenty...
Read more >
postprocessing: Versions - Openbase
Changelog EffectComposer. Added setMainScene and setMainCamera methods to allow changing the main scene/camera for all registered passes. See #410 and #391.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found