Closed juanuys closed 3 years ago
Yeah that has been in the TODOs in the readme for a bit, would need to find a way on how to do that.
On the API side ideally it would require only a camera and multiple textures. Then internally there would be as many savedModelMatrix
as the textures passed initially.
Then it would be a matter of choosing the texture and savedModelMatrix to use in the shader.
It's doable in my opinion.
Multiple materials are now supported in v2.0.0
🎉
Check out these examples:
https://marcofugaro.github.io/three-projected-material/multiple-projections https://marcofugaro.github.io/three-projected-material/multiple-projections-instancing
Three.js supports multiple materials on a Mesh.
I'm a bit of a Three.js/GLSL newb, so would like some guidance on how to get this library to support multiple projections (i.e. projecting material 0 onto the "front" and material 1 onto the "back" of a set of geometries). I guess I can instantiate two ProjectedMaterials, each with a different texture and a different camera.
Would it require changes to the shaders? It seems it would require multi-material support here.