i used the 'SimpleShadow.fx' applying to the soil and the grass shadow
using additional camera that fits everything that needs to be projected
sorry for my bad english.
the following list:
Shadow:
position object 65001,0,550,z#+550
position camera 1,object position x(65001),object position y(65001),object position z(65001)
set camera to object orientation 65001
set current camera 1
view matrix4 1
projection matrix4 2
multiply matrix4 3,1,2
set effect technique 1,"GetDepth"
set effect constant matrix 1,"LightProjMatrix",3
sync mask 2:fastsync
set current camera 0
if returnkey() then paste image 100,0,0
set effect technique 1,"NormalRender"
return
z#=object position z(1) 1=pos.character
make object 65001,10:yrotate object 65001,180:rem object 65001=light pos.
rem load effect for shadow character
load effect "FX\SimpleShadow.dbs",1,0,1
rem camera
make camera 1:set camera range 1,1,550:yrotate camera 1,180:set camera fov 1,90:color backdrop 1,rgb(255,0,0)
create bitmap 1,1024,768
get image 100,0,0,1023,767
set camera to image 1,100,1024,768
delete bitmap 1
Result=make matrix4(1):Result=make matrix4(2):Result=make matrix4(3)
set current bitmap 0
object 2,3,4 terrain
Set_terrain:
rem prepare terrain
for i=2 to 4
if object exist(i) then delete object i
next i
load object "Maps\Map"+"_level"+str$(Level)+".x",2
clone object 3,2
clone object 4,2
clone object 5,2
position object 2,0,55,0
position object 3,0,55,3100
position object 4,0,55,6200
position object 5,0,55,-1950
rem texture and effect shadow terrain
for i=2 to 4
set object effect i,1
texture object 2,1,100
next i
Main_loop:
repeat
ink rgb(255,255,255),0
set cursor 0,0
print Index_map
gosub Shadow
gosub Player
gosub Control_distance
sync mask 1:sync
until escapekey()
click for download fx..