question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OutlinePass doesn't work with renderToScreen

See original GitHub issue
Description of the problem

OutlinePass doesn’t work when setting renderToScreen to true. Instead of rendering the outlines, it renders a blank screen.

I have found out through trial and error that OutlinePass requires that it be followed by a ShaderPass (or possibly just another pass) containing something. The postprocessing example uses a ShaderPass with an FXAAShader. Alternatively, a ShaderPass with a CopyShader works too.

I’m not sure if this is a feature or a bug but it was really annoying to try to get it to work.

Three.js version

It happens in the dev version of OutlinePass and the original revision that added it to the repository.

Browser

Tested in Chrome 54.0.2840.99 m (64-bit) and Firefox 50.0

OS

I’m on Windows 7 x64

Hardware Requirements (graphics card, VR Device, …)

I’m using an Intel integrated graphics chipset

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
WestLangleycommented, Nov 17, 2016

EffectComposer has not had significant development in 4 years or so. If you are interested in considering alternate implementations, you might want to have a look at @spite’s Wagner API. I expect there would be a lot of interest in revisiting this topic.

1reaction
Mugen87commented, Nov 16, 2016

As far as i know, renderToScreen should always be set to true for the final pass in your chain. If this pass does not evaluate the property, use an additional CopyShader pass for the final render step.

I’m not sure, why some passes don’t check renderToScreen. Besides, some passes (like OutlinePass) are rendering to the readBuffer. Not sure if this approach is correct/consistent. I’ve always thought a pass should basically read its input data from the readBuffer and write its result to the writeBuffer (MaskPass might be an exception). In these cases needsSwap should be set to true so the composer swaps the buffers after the render process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Three.js: Not able to combine background pass with outline pass
I want to render a mesh into a background scene so I can customize the background with more powerful shaders (gradient, special effects,...
Read more >
Outlinepass is showing nothing - Questions - three.js forum
I have added post-processing in gltf model on mouse over but it is not showing anything- Code- import { Component, Input ,Output, ...
Read more >
ThreeJS OutlinePass error on Vertex shader not compiled
Trying to replicate ThreeJS outline postprocessing example, but I'm facing an error on some uncompiled Vertex shader.
Read more >
Three-outlinepass NPM | npm.io
Check Three-outlinepass 1.2.0 package - Last release 1.2.0 with ISC licence at our NPM packages aggregator and ... renderToScreen = true; outlinePass.
Read more >
three-outlinepass - npm
Oh noes! Something went wrong. Illustration of wombats. The package file size seems to be too large or the last published date is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found