OutlinePass doesn't work with renderToScreen
See original GitHub issueDescription 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:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

EffectComposerhas 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.As far as i know,
renderToScreenshould always be set totruefor the final pass in your chain. If this pass does not evaluate the property, use an additionalCopyShaderpass for the final render step.I’m not sure, why some passes don’t check
renderToScreen. Besides, some passes (likeOutlinePass) are rendering to thereadBuffer. Not sure if this approach is correct/consistent. I’ve always thought a pass should basically read its input data from thereadBufferand write its result to thewriteBuffer(MaskPassmight be an exception). In these casesneedsSwapshould be set totrueso the composer swaps the buffers after the render process.