Search code examples
javascriptperformancethree.jsframe-ratelight

three.js low fps using RectAreaLight


I am building a scify scene where I am using RectAreaLights to simulate strip lights. The problem is whenever I use these type of lights I get low fps (not more than 20, 30). Switching to other types of lights like PointLight or SpotLight solves the performance issue, showing a steady 60 fps.

Is there anything I can do to improve performance using RectAreaLight?


Solution

  • RectAreaLights are just expensive. Especially if you are using a lot of them... Perhaps you can get away with using one or two, but break them up by covering them with geometry? If you really need lots of little glowy bits.. consider adding the UnrealBlur post processing effect via EffectComposer.. that can be a good way to get lots of glowy things, at the expense of some realism, and careful attention to contrast to get the glow to pop.