Implement usage of active textures.

Solves #1