It is possible to make polygon-wise billboarding effect in three.js?
Three.js provides sufficient utilities for naive billboarding using quaternion.
plane.quaternion.copy( camera.quaternion );
Now, I want to draw a lot of images. To make it efficient, I use one geometry and a lot of polygons where fractions of atlas come in (Douglras’ codepen).
In this case, to realize a billboarding affect, quaternion is no longer available because each “polygons” needs to rotate instead of “geometry”. It is possible to make polygon-wise billboarding effect in three.js?
I come up with some ideas that modifies vertices’ position of each polygons in vertex shader, but can’t figure out how.
- vertex: a coordinate in a space.
- face: vertices.
- polygon: faces.
- geometry: polygons.