Max texture units in threejs r182

After upgrading to threejs r182 from r181 i see console fills with warnings:
Trying to use xx texture units while this GPU supports only 16

This happens if the scene contains at least five points lights.
With r181 I could add far more lights before reaching the limit.

Have there been any implementation change on this side?

Yes, shadow mapping has been received fundamental updates in r182. There were multiple PRs but one of the leading ones is:

Do your point lights cast shadows? How many lights could you add with r181 before the engine warned you?

2 Likes

Yes, they cast shadow. Just did a test and with r181 I can add 10 point lights before reaching the limit.
Moreover r181 does not emit a warning but I get a program error:
Program Info Log: FRAGMENT shader texture image units count exceeds MAX_TEXTURE_IMAGE_UNITS(16)

Consider to open an issue at GitHub if the reduced number of shadow casting lights is an issue for you.

GitHub issue for reference: