use texture variable correctly