Drawing outlines makes my scene dark

Hi
I’m using outlines from example on threejs.org, but I have a little problem, I copied code from https://gltf-viewer.donmccurdy.com/ and everything works fine as you can see on this picture:

But, when I implemented outlines (same code as in example) my scene went to this:

When i dissable drawing EffectComposer everything is back in normal, any suggestions? The backgroud is Sky from examples (turning off changes nothing), and envinroment map behind is also dark.

My config of renderer is

    renderer.setPixelRatio(window.devicePixelRatio);
    renderer.setSize(window.innerWidth, window.innerHeight);
    renderer.setClearColor(0xFFFFFF, 1)

    renderer.outputEncoding = THREE.sRGBEncoding;
    renderer.physicallyCorrectLights = true
    renderer.shadowMap.enabled = true

my lights are:

    const ambientColor = 0xFFFFFF
    const ambientIntensity = 0.3
    const directIntensity = 0.8 * Math.PI
    const directColor = 0xFFFFFF

    const light1 = new three.AmbientLight(ambientColor, ambientIntensity);
    light1.name = 'ambient_light';
    scene.add(light1);

    const light2 = new three.DirectionalLight(directColor, directIntensity);
    light2.position.set(0.5, 0, 0.866); // ~60º
    light2.name = 'main_light'
    light2.castShadow = true
    light2.shadow.mapSize.width = 1024
    light2.shadow.mapSize.height = 1024

    scene.add(light2);
1 Like

have you solve this problem, i got stuck here too

Hi, no I disabled outlines because outlines FAXX is not supported on oculus and causes problems… you have to find some materials supporting it. Or write custom opengl methods…