-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PBR Light Limits #8463
Comments
See: #7060 for a potential solution. |
The exact issue you are suffering from is out of your power and even out of the power of the development team. There is nothing you can do in order to fix the problem unless you do some crazy One thing you can do is to take advantage of the limitations of the human brain where it has a hard time seeing detail in some situations but you can almost instantly see something missing in other situations. On the dim lights that don't light up a lot of the space, just ditch the shadows and no one will probably notice any of the shadows missing. Only add shadows to lights that are very bright and light up a large amount of objects and cast a lot of shadows. Just play around with the values and see what looks good. Another thing you can do is if you have a lot of lights that are spaced out very far from the camera, there is no need to render them because that specific light will not effect the local space (where the camera is). A last ditch effort would be to remove shadows from all the lights, it might look like there is detail missing from the scene but depending on what you are trying to make, it might still be fine and playable. |
Is there any way to detect when there are too many lights in the scene and disable some if needed? |
Description of the problem
When adding more point lights to the PBR Light demo VIA
If SOME_NUMBER is > 12 everything breaks all lighting with WEBGL complaining about running out of registers.
It may be an idea to check how many lights are on the current scene, and only render with up to the (13) (12+ the original one in the example) closest to the camera ones at any given time, or do multiple renders for the excess lights?
The exact error is:
THREE.WebGLProgram: shader error: 0 gl.VALIDATE_STATUS false gl.getProgramInfoLog Fragment shader sampler count exceeds MAX_TEXTURE_IMAGE_UNITS (16).
...
Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: