Разработчик
Регистрация: 14.12.2008
Адрес: Томск
Сообщений: 530
Написано 270 полезных сообщений (для 883 пользователей)
|
Ответ: AShadow. Проблема с тенями.
Хз. Пробовал, вроде не получилось.
Вот, накатал за пару минут небольшой пример. Наглядно показывает глюк. Проверьте у себя, вдруг я один такой неудачник.

Graphics3D 800,600,32,0
SetBuffer BackBuffer()
Include "AShadow.bb"
InitShadowLib()
SoftSelfShading=0
ZfailMode=1
plane=CreatePlane()
PositionEntity plane,0,0,0
CreateReceiver(plane,1)
obj=CreateCube()
ScaleEntity obj,3,3,3
MoveEntity obj,0,3,0
CreateCaster(obj,0)
obj2=CreateCube()
ScaleEntity obj2,3,3,3
MoveEntity obj2,0,9.4,0
RotateEntity obj2,0,25,0
CreateCaster(obj2,0)
cam=CreateCamera()
light=CreateLight(2)
PositionEntity light,7,15,7
PositionEntity cam,0,3,-15
GlobalSLight(light,2,100)
cam_pitch#=0
cam_yaw#=0
PositionEntity cam,0,3,15
RotateEntity cam,0,180,0
While (Not KeyHit(1)) And (EntityX(cam)>-4)
TranslateEntity cam,-0.01,0,0
UpdateWorld
UpdateShadows cam
ARenderWorld(cam,1,0.6)
Flip
Wend
PositionEntity cam,0,3,-15
RotateEntity cam,0,0,0
While (Not KeyHit(1)) And (EntityX(cam)>-18)
TranslateEntity cam,-0.01,0,0.01
RotateEntity cam,cam_pitch#,cam_yaw#,0
If cam_yaw#<120 Then cam_yaw#=cam_yaw#+0.2
If cam_pitch#<40 Then cam_pitch#=cam_pitch#+0.1
UpdateWorld
UpdateShadows cam
ARenderWorld(cam,1,0.6)
If EntityX(cam)<-4 Then Text 10,GraphicsHeight()-15,"Do you see that? O_o?"
Flip
Wend
End
|