Manual shadows of a cube

Can someone give me some code on how to draw a shadow on the y=0 plane of a cube (above the y =0 plane).


I don’t have code for it, but my understanding is that you can do simple shadows onto one surface in the same way you can do mirror reflections. That is, with a second render pass with a totally different projection matrix and for the case of shadows, different coloring.