This application is a reproduction of goodboy's FV animation.
It was also implemented based on a great video by Akella.
https://nemutas.github.io/goodboy-effect/
instancedMeshで、ひとつひとつのmeshの座標(頂点座標ではない)を参照したい場合は、instanceMatrix
から取得できる。
goodboy-effect/src/webgl/shaders/tileVert.glsl
Lines 7 to 17 in ec3ec03
vec3 meshPos = instanceMatrix[3].xyz;
3次元のアフィン変換行列において、4列目がtranslateに関わる変換なので、[3].xyz
でアクセスができる。