I think that may be the problem. Here is a part of the code with the update of everything to do with the water :
`----------------------------------------------------
` Create Water
`----------------------------------------------------
function MakeWater(Obj,Shader,Img,ImgSize,Height#)
`Globals
global WaterObj=Obj
global WaterHeight#=Height#
global Fx=Shader
`Setup Cameras
Sw#=screen width():Sh#=screen height()
for c=1 to 2
make camera c
set camera range c,1,15000
set camera aspect c,Sw#/Sh#
backdrop off c
set camera to image c,Img+(c-1),ImgSize,ImgSize
set camera fov c,75
next c
`Make Water plain
load image "Media/Waves.dds",Img+2
load image "Media/Fresnel.bmp",Img+3
load image "Media/WaterMask.bmp",Img+4
make object plane WaterObj,40000,40000
texture object WaterObj,0,Img
texture object WaterObj,1,Img+1
texture object WaterObj,2,Img+2
texture object WaterObj,3,Img+3
texture object WaterObj,4,Img+4
xrotate object WaterObj,270
yrotate object WaterObj,380
position object WaterObj,4000,5,0
load effect "FX/Water.fx",Fx,0
set object effect WaterObj,Fx
set object transparency WaterObj,1
endfunction
`----------------------------------------------------
` Update Water
`----------------------------------------------------
function UpDateWater()
`UpDate Water plain
position object WaterObj,object position x(WaterObj),WaterHeight#,object position z(WaterObj)
Hide object WaterObj
`Upade Refract/Reflect cameras
set effect technique Fx,"Refract"
UpDateRefraction()
if camera position y()>WaterHeight#
set effect technique Fx,"ReflectRefract"
UpDateReflection()
else
fog on:fog color rgb(55,65,75)
fog distance 2000
endif
`Show Water
show object WaterObj
sync mask 1^0
endfunction
`----------------------------------------------------
` Refraction Update
`----------------------------------------------------
function UpDateRefraction()
position camera 1,camera position x(),camera position y(),camera position z()
rotate camera 1,camera angle x(),camera angle y(),camera angle z()
if camera position y()>WaterHeight#
set camera clip 1,1,0,WaterHeight#+30,0,0,-1,0
fog on:fog color rgb(55,65,75)
fog distance 250+(camera position y()-WaterHeight#)*10
endif
if camera position y()<WaterHeight#
set camera clip 1,1,0,WaterHeight#-30,0,0,1,0
fog on:fog color rgb(55,65,75)
fog distance 1000
endif
set camera clip 2,0,0,0,0,0,0,0
sync mask 2^1
fastsync
fog off
endfunction
`----------------------------------------------------
` Reflection Update
`----------------------------------------------------
function UpDateReflection()
position camera 2,camera position x(),WaterHeight#-(camera position y()-WaterHeight#),camera position z()
rotate camera 2,-camera angle x(),camera angle y(),camera angle z()
set camera clip 1,0,0,0,0,0,0,0
set camera clip 2,1,0,WaterHeight#-15,0,0,1,0
sync mask 2^2
fastsync
endfunction
Since I am kinda new to DBpro I might need a little help with it
Im still scratching my head over the error you can ignore until getting out of test game
Fpsc works fine until I mod it :/