Ti-W-N deposition stress as a function of microstructure