damage accumulates correctly in shader