Was sometimes crashing when setting up a texture in a shader.