Rebuild shader if necessary