Clamping here might be a bit too much if output is expected to be HDR. But we don't support HDR atm so clamping is fine.