troika
troika copied to clipboard
BatchedText: billboard material
Hello again :)
I'm trying to combine BatchedText and your createBillboardMaterial, but I'm not good at shaders so I don't know why it doesn't work. Maybe I need to do some magic matrix stuff, but I can't figure it out which matrix to use :)
Could you please suggest what I'm doing wrong? Thanks again :D
createBillboardMaterial source (it works with usual Text class just fine):
https://github.com/protectwise/troika/issues/101#issuecomment-774341245
https://codesandbox.io/s/createbillboardmaterial-xl6mt?file=/src/createBillboardMaterial.js:0-580
BatchedText + createBillboardMaterial — all texts are fixed in camera view
BatchedText + material without modifications — all texts are in right places, but they don't look at the camera
P. S. It might make sense to add the createBillboardMaterial implementation to the repository, since Text looking always at the camera is a very common request among developers?