N8python / n8ao

An efficient and visually pleasing implementation of SSAO with an emphasis on temporal stability and artist control.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pass.setRenderer is not a function

vedrankolac opened this issue · comments

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",
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"

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 :)

Support has been added right now! Check the docs under Usage (postprocessing).

Great!!
Thanks for the help!!