Only conditionally save input textures to hooks
Currently we save all bound textures, even if they're not required by any hooks. In general, it might be hard to optimize this, but at least in the special case of only one stage requiring the texture, we could optimize this.
Ideally this would go hand-in-hand with the complete-grand-refactor-that-will-solve-all-problems AKA deciding the render stages ahead of time.