How to use post processing effects only on a single object?

Hi there,

I know it is possible to use the post proccessing FX only on a single object, but it didnt worked in my project. I tried to wrap the outline effect in a EffectComposer component and then I wrapped the select component over a sphere object, just like in the documentation.

This is the code:

 <Selection>
        <EffectComposer>
          <Outline edgeStrength={100} />
        </EffectComposer>

        <Select enabled>
          <Sphere scale={scale} position={position} outline={Outline}>
            <meshStandardMaterial color={color} wireframe={wireframe} />
          </Sphere>
        </Select>
      </Selection>

Unfortunately it is not working like this and I am not sure what I do wrong. As far as I know, it is not possible with all effects to just use it for single object, but it should be possible with outline and noise.

Here is an example from the noise effect which is just used on a single object:

Screenshot 2022-09-21 at 17.15.38

Can someone please help me please?

I am still trying to make it work, but somehow it isnt working…

Maybe someone can give me a hint? :woozy_face:

it works only for a few effects like outline, ssr and bloom. effects have to support it explicitely. here’s outline for instance: Selective outlines - CodeSandbox

for plain react + three stuff i’d suggest pmndrs discord, the author of postprocessing is there as well. here i think it must be quite jarring for most people to see too much jsx.

1 Like

Finally I found out that it is not possible to use the noise effect for a single object. However there is a work around which can make it possible anyway. As far as I know we could create a noise effect with different shaders. Does anyone knows a good tutorial on how to use shaders within Three.js?

1 Like

Thank you, do you have any reference why we cannot create the noise effect only for a single mesh?