Search code examples
three.jsglobalcompositeoperation

Global composite operation in three.js


Globalcomposite are available in html5 canvas. Is it available in threejs? How to implement the destination out composite operation in three.js?

Thank you.


Solution

    • If you are using three.js ' CanvasRenderers you can use globalCompositeOperation as they are for 2d contexts.
    • If you are using a webgl context, basically everything is possible with shaders. As Shiladittya's comment states, three.js also provides blending modes (see this example). They are available in the material property blending.