pass.setRenderer is not a function
vedrankolac opened this issue · 4 comments
vedrankolac commented
When I instantiate it like this:
const composer = new EffectComposer(renderer);
// N8AOPass replaces RenderPass
const n8aopass = new N8AOPass(
scene,
camera,
width,
height
);
composer.addPass(n8aopass);
I get this error:
postprocessing.esm.js:7768 Uncaught TypeError: pass.setRenderer is not a function
at EffectComposer.addPass (postprocessing.esm.js:7768:10)
I am using this packages:
"three": "^0.152.2",
"postprocessing": "^6.31.0",
vis-prime commented
This lib is not created for the EffectComposer from pmndrs(yet!), instead use inbuilt one in
import { EffectComposer } from "three/examples/jsm/postprocessing/EffectComposer"
vedrankolac commented
oh... got it!
It works now :)
Is there a way to get a result from three/examples/jsm/postprocessing/EffectComposer
to pmndrs EffectComposer
?
i.e. I am using MotionBlurEffect
from realism-effects
and would like to have it work together with N8AOPass
:)
N8python commented
Support has been added right now! Check the docs under Usage (postprocessing).
vedrankolac commented
Great!!
Thanks for the help!!