mrdoob/three.js — pull request #3784 by ikerr (2013-08-20 17:08:17+00:00)
Title: This commit fixes a skinning bug that occurs when two or more SkinnedMes...

...h objects share a common material and have bone textures of different sizes. Currently, bone texture sizes are hard coded into the shader program, requiring the program to be re-built when the bone texture size changes; however, the current implementation does not handle this correctly, which can lead to the shader accessing incorrect bone transforms.

This commit uses two uniforms to store the bone texture dimensions. These uniforms are updated as needed, eliminating the need to re-build the shader and fixing the bug.