ThreeJS OutlinePass gets removed if TAA i enabled

27 views Asked by At

I would like to use a TAARenderPass in my three js app because the result is pretty good.

Compared to FXAA it is really clear in my usecase, and FXAA is a bit blurry (in comparison).

So I have managed to add it without issues:

    const taaPass = new TAARenderPass(ctx.scene, ctx.camera);
    taaPass.sampleLevel = 4
    composer.addPass(taaPass)

the issue is that I also want to use an outlinepass. If I add the outline pass before the TAA pass, then it just gets overwritten and there is no visible outline. If I add it after the TAA pass, then it of course won't get any AA, and it looks really jagged.

Is there any way to get the best of two worlds with both an outline pass and TAA?

It would be OK with FXAA on just the outline pass if that is an option.

and my outline pass is pretty standard (I think)

    outlinePass = new OutlinePass(
      new THREE.Vector2(window.innerWidth, window.innerHeight),
      scene,
      camera
    );
    outlinePass.visibleEdgeColor.set("#ff0000");
    outlinePass.hiddenEdgeColor = outlinePass.visibleEdgeColor;
    outlinePass.edgeGlow = 0.7;
    composer.addPass(outlinePass);
0

There are 0 answers