Skip to content

EffectComposer changes the color of the background #436

Answered by blenderskool
blenderskool asked this question in Q&A
Discussion options

You must be logged in to vote

Solved it! After messing about with color spaces and gamma correction, I figured out that the scene should be updated to use Linear color space workflow(also mentioned in the documentation). Make sure to make this encoding change for the textures as well.

The code now looks like this:

<Canvas camera={{ position: [0, 0, 3] }} linear> {/* notice the linear prop here */}

  <color attach="background" args={["#6ddad0"]} />

  <Suspense fallback={<Html center>Loading.</Html>}>
    <Scene />
  </Suspense>

  <EffectComposer>
    <DepthOfField
      focusDistance={0}
      focalLength={0.02}
      bokehScale={2}
      height={480}
    />
  </EffectComposer>

</Canvas>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by blenderskool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant