I can not figure out how I can use both the OutlineEffect (or any other effect) in combination with composer - I need composer for OutlinePass.
OutlineEffect is more some sort of edgedetection shader, and OutlinePass will draw a (fat) outline around my objects and helps me highlight selected objects. I need them both for the result I am trying to achieve.
Does anyone know how to combine them?
You can try to extract the shader code of
OutlineEffect and turn it into a normal post-processing pass.
The problem is that
EffectComposer definitely needs an instance of
WebGLRenderer for its internal logic. So it’s not possible to apply
OutlineEffect as a ctor argument to
EffectComposer. In general, all effects are not designed to work with additional post-processing.
…mmm, I need to find out what the workings of those postprocessorpasses are… but I am picking up the gauntlet…
Ok, I am not too proud of the solution I came up with, but it works:
The RenderPass is the first pass of my render composition and I found it just does a normal render. I figured out that I could just change the line render.render() to effect.render() in the file renderPass.js - where effect is a global variable pointing to the outlineEffect…
Now I got both effects - me happy!
I will mock up a demo later