With just one win from their previous three matches in Pool 2, Glasgow's hopes of progressing were dashed.
"The effort to put into that and score what we believe were two tries and get nothing was tough," said Townsend.
Glasgow struggled before Ryan Grant's late try was converted but Blues held on.
“We have missed out on Europe again”
Gregor TownsendGlasgow Warriors head coach
The hosts' handling errors were compounded, in Townsend's view, by mistakes by the match officials.
He believes his side should have been awarded a penalty try moments earlier when Cardiff skipper Sam Hobbs was sin-binned by French referee Pascal Gauzere for the third scrum offence in quick succession.
And Townsend was also frustrated when Rob Harley was penalised for obstruction by the video referee after Niko Matawalu had dived over in the 36th minute.
"Not getting two tries in the first half, decisions from the referee and the TMO; one looked like a clear penalty try from the scrum that were driving over the line then he goes back to the penalty to give a yellow card," Townsend said.
"Then the next one they kick through the scrum, it looked like when we see the replay, illegally, he plays on. Then, the try that went to the TMO, I'm coaching a different game if you're not allowed to clear a ruck, because every ruck is like that in a game.
"We pick and go through the middle like you would do normally. You're not allowed to ruck now by the sounds of things."
Townsend rued the errors that cost his side and extinguished their Heineken Cup hopes.
"We have missed out on Europe again," he added. "We are all aware that to progress in this competition you have to play close to your best.
"We have done that in a game and a half. The last two weeks we haven't been close to our best and we have paid the price."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.