Fix texture parameters not being backed up and reverted