Building LED cube using 74HC595N
You'll need resistors, of course, and I believe you can only source about 70mA per 74HC595N or something like that, so if you plan to ever light more than three LEDs at the same time that are driven by the same chip, limit the current accordingly (and don't expect the cube to be bright).

You probably want to drive your layers (cathodes, it seems from your description) via some transistors, possibly a Darlington array, like a UDN2981, similar to https://electronics.stackexchange.com/a/82025/25217.