What we can do is override the <lume-scene>
element’s drawScene
function so that we can call a custom Three.js effect composer:
const scene = document.querySelector('lume-scene') // get the <lume-scene> element
const renderPass = new RenderPass(scene.three, scene.threeCamera)
composer.addPass(renderPass)
const glitchPass = new GlitchPass()
composer.addPass(glitchPass)
const outputPass = new OutputPass()
composer.addPass(outputPass)
scene.drawScene = () => {
// If there are multiple cameras in the Lume scene, make sure to always
// use the currently-active camera.
renderPass.camera = scene.threeCamera
composer.render()
}
Live demo: