Why does substracting -1 in shader fail for a float data type?
Without seeing the error message I can't be sure but I think it's failing on the 1 being int instead of a float. 

float inv_coord = v_coord - 1.0;


There is a simpler method, you can do 1.0 - v_coord and do away with the abs.