Problem with OutlinePass and LOD


My scene contains different objects and some of them are LOD. I am trying to add outline pass to highlight selected objects. When I select not LOD object it is highlighted as expected but alongside with it all LOD objects are highlighted too. I’ve created a demo on react-three-fiber for this

I’ll rewrite it on pure js+three shortly to prove that the problem is not with react-three-fiber

I have no idea why this happens. I’ve found out about problems of outline pass with skinned meshes and instanced meshes but this is not the case here
I’ve tried to understand how outline pass works by dissecting underlying shaders, but I don’t have much expertise in glsl

Can somebody share some insights why this might happen?


Example on pure three js

1 Like

does this help? Selective outlines - CodeSandbox the postprocessing library by varunesc supports selective effects ootb. react-postprocessing for sure is a bit troubled but in any way, i’d use raw postprocessing instead of three/examples/jsm without a second thought.

Hi, I encountered the same problem too…Did you fix that problem?