-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
WebGLRenderer: Add support for multiple shader programs with a single material. #15047
Comments
I've experimented in this context for a while and came up with the following minimal solution: Mugen87@e0099e5 It actually solves the ping-pong effect in certain scenarios e.g. when rendering to a render target with different output encodings (#19056). However, the general performance gets worse since the renderer has to compute a program key per frame for each object right now. This becomes to a problem when rendering scenes with a lot of objects: https://raw.githack.com/Mugen87/three.js/dev51/examples/index.html#webgl_lights_pointlights2 I'm trying to figure out a solution to avoid unnecessary calls of |
It would be necessary to have multiple multiple webglprogram on a single material to solve #11400.
This would require several steps to be taken to get this done:
We would also need to track which program gets used by which material to make sure that the programs get deleted when the material gets disposed of.
The text was updated successfully, but these errors were encountered: