PostFX hide mesh if use RectAreaLight and MeshPhysicalMaterial

Hi,
I have a problem on a postprocessing made with WebGLRenderTarget.

If i use a rectAreaLight and a mesh with a MeshPhysicalMaterial (or MeshStandardMaterial), when I render scene by simple postprocessing this mesh won’t render, but if I render without postFX the mesh will render.

In this SanBox you can see the bug:

row 129 you can disable the postprocessing render and you will see that the mesh isn’t rendered.

Can someone help me? :pray: :pray: :pray: thanks

The mesh is black so it seems you are not using RectAreaLight correctly. It’s mandatory to call RectAreaLightUniformsLib.init(); if you want to include this type of light into your scene. This is also done in the official example:

https://threejs.org/examples/webgl_lights_rectarealight

RectAreaLightUniformsLib is a file from the examples directory. You can import it via:

import { RectAreaLightUniformsLib } from './jsm/lights/RectAreaLightUniformsLib.js';
1 Like