2

The renderer will clear its output before rendering even if autoClear is set to false due to the fact that the constructor property preserveDrawingBuffer is set to false by default.

Both of these properties can control whether or not the renderer clears before rendering output. They both also conflict with each other (if one is false, the other must be true, or vice versa).

Is there a reason for having two properties of the renderer doing the same thing?

Adnan
  • 814
  • 1
  • 6
  • 8

1 Answers1

1

They are separate issues.

renderer.autoClear = false is appropriate if you have multiple render passes, or if you are doing post-processing with THREE.EffectComposer and BloomPass, for example.

preserveDrawingBuffer is required if, for example, if you require persistence for some reason.

EDIT: preserveDrawingBuffer = true is not required to take a screenshot.

three.js r.87

WestLangley
  • 102,557
  • 10
  • 276
  • 276