(for photoshop)
start by typing the text on a new layer, it doesn't matter what color/font you use for the text
(it doesn't matter what u use as background)
now right click the text layer and select "blending options" or just double click on the layer
you should now see this window>
now set these settings
this should be the result
now duplicate the text layer and clear the bottom layer's layer style
now apply these new settings to that layer:
this should be the result:
(ive moved the bottom layer down and to the right for a few pixels to create a more 3d effect)
once you've made a layer style you can save it like so:
that way you can easily apply it to text
good luck