This can reproduce the bug reported at #669.
Apparently, the fix (8827520d4a) is
no longer required after 3550abef7a.
That's pretty odd, but examples/moire proves this fact.
Updates #669
Updates #759
This is a preparation to introduce shaders. Shader programs
require images as uniform variables, but the current way would make
API complex unnecessarily.