remove hiddenEdgeColor from outlinePass in three.js

85 Views Asked by At

I'm using the outlinePass in a three.js project and it has a feature to show the outline of geometry that is behind another in different color, but I don't want this hidden outline at all. How do I remove this?

For example, I don't want the Red outline in below screenshot:

Three.js outline effect

1

There are 1 best solutions below

2
Gangula On BEST ANSWER

You can achieve this by setting the hiddenEdgeColor to black

outlinePass.hiddenEdgeColor.set(new Color('black'))

Check below screenshot:

Three.js outline pass screenshot with no hidden edge color