Where to start with adding post processing and image effects?

Ah I see

by user 103054507105067008

I was hoping to insert the bloomPass into the composer that was in use already but I think I just have to make my own fresh composer and use that instead then it will overwrite the composer that was being used before?

by user 103054507105067008

There’s no composer in use by default (only when you open the site with the ?postfx query param but only then)

in all other cases you have to create your own right now

Hi, I triedd it two
I saw that the code is incomplete

I add that but now I have a black screen:

by user 224464722878005248

this.context.composer = new EffectComposer(this.context.renderer );

by user 224464722878005248

have you done this too? You need to give it a pass that renders the scene

Yeah I get a black screen but that’s because the composer added doesn’t have a render pass for the main scene, only for the bloom I assume

by user 103054507105067008

Yes :slightly_smiling_face:

by user 224464722878005248

I have some troubles with domWidth etc

by user 224464722878005248

It’s on this.context.domWidth etc

Got further but now got

three.module.js:27506 Uncaught TypeError: Cannot read properties of undefined (reading 'parent')
    at WebGLRenderer.render 

by user 103054507105067008

Hope this is helping others, I’m so close!
PostProcessing.ts

by user 103054507105067008

I don’t know why but I know this error

by user 224464722878005248

Try to fix it

by user 224464722878005248

I need to get the Camera in the scene as a THREE.Camera next somehow then I’m close

by user 103054507105067008

It’s not this.context.mainCamera ?

by user 224464722878005248

This works, add on a gameobject in your scene and assign the camera to it on the component
PostProcessing.ts

by user 103054507105067008

by user 103054507105067008