changed the way to bind texture parameters