Q:

How does (clipping) mask in Photoshop work in my specific case

This is my basic layer setup:

Textlayer
Shape
Background

I want to mask the shape-layer so the parts where the text in the shape is transparent.

Rasterizing the shape and deleting the text-part is not an option. Setting the color of the text to red is also not an option, because the background can be a picture.
I just can't figure out how to do this. All tutorials for masks have different goals than mine. How can I do this?

A:

The answer is very simple, but obscure. As it happens, it doesn't involve clipping masks. :)
Set the text over the shape. Open the text layer Blending Options dialog and set "Fill" to 0 percent, then change the Knockout dropdown to "Deep," which knocks out everything through to the background. This is one of those almost-never-used Photoshop features that comes in handy on the rare occasion that you need it.

