mrdoob/three.js — pull request #3656 by MiiBond (2013-07-19 19:26:18+00:00)
Title: Linking issue due to mismatched shader int precision (issue #3146)

Forcing shader precision for ints to address Issue #3146. Also enabling program log to determine cause of linking errors.

The linking issue due to int precision has been seen in Chrome Canary for a while and just started happening in Chrome Beta this week, forcing me to look into the problem more. This issue crops up not only in my shaders but in many of the Three.js examples as well.

The solution was to just declare the precision of ints in both the vertex and fragment shaders. Perhaps a different precision value could be used so that the user could specify float and int precision separately?