Don't use roundf, truncating is fine
Don't truncate the transformed texture's offset