Use normals in a Cycles Shader properly [Cycles]

Hi, I want to create a shader for Cycles that depicts the transparency of the material as a function of the its normal. I know how to create this effect with the compositor in post, but I would like to use it as a shader material in order to place several objects within each other (e.g. a smaller sphere in a bigger sphere) and to have them visible in the way depicted above.

Thanks for any help.



thanks, that was exactly, what I was looking for.

I tried various nodes but never thought of looking at the Layer Weight node.