Shadows do work but you have to use all the right commands, specially the undocumented ones.
Here is a little snippet I knocked up ages ago that shows how to use them properly.
+ Code Snippetsync on : sync rate 60 : autocam off
` 0 = use cpu (slow and innacurate), 1 = gpu shader (fast and accurate)
shader=1
` make a texture
ink rgb(255,0,0),0
box 0,0,16,16
get image 1,0,0,16,16
` hide main light
hide light 0
set ambient light 30
` make ground
make matrix 1,1000,1000,64,64
prepare matrix texture 1,1,1,1
position matrix 1,-250,0,-250
` make some objects to cast shadows
o=1
for f=0 to 340 step 20
inc o
make object box o,5,40,5
texture object o,1
set shadow shading on o,-1,1000,shader
` object, mesh, range, shader
` object=quite obvious really
` mesh=-1 means use objects mesh, but gives option of using lower res mesh
` range=how far to cast shadow - useful as shadows cast on multiple objects through solid objects. Grrrrr
` shader=0=cpu,1=gpu
position object o,100*sin(f),20,100*cos(f)
next f
` make light object to show where light is
inc o
make object sphere o,-10
` make new light and set shadow position
make light 1
set point light 1,0,0,0
set light range 1,1000
lightmode=1
` set shadow mode to 'light' mode,ie shadows will be cast from selected light number
` in this case is 1 (x, y and z values will be ignored)
` you can also use value of -1 which means you can force position of shadows
set shadow position lightmode,0,0,0
position camera -20,8,-150
point camera 0,0,0
ink rgb(255,255,255),0
a#=0
do
control camera using arrowkeys 0,2,2
gosub movelight
text 0,0,"cursors to move around"
text 0,20,"FPS="+str$(screen fps())
sync
loop
movelight:
a#=wrapvalue(a#+0.2)
x#=newxvalue(0,a#,150)
y#=50+(50.0*sin(a#*2.0))
z#=newzvalue(0,a#,150)
position light 1,x#,y#,z#
position object o,x#,y#,z#
return
As notes, it's very difficult to detect whether your graphics card supports shadows. When 5.8 came out there was some demo programs that Rick put together to show how to use new shadow commands. It states that only Vertex Shader 1.1 is needed for shadows. However my laptop with ATI mobility graphics has better than that yet shows no shadows at all.