That's quite a bug, but is actually quite a good feature. Set fog far away and you then have control over fog colour!
Some code to demonstrate;
sync on : sync rate 60 : autocam off
fog on
fog color rgb(255,255,255)
fog distance 10000
` 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 315 step 45
inc o
make object cube o,20
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),10,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
` 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#=10
z#=newzvalue(0,a#,150)
position light 1,x#,y#,z#
position object o,x#,y#,z#
return
Boo!