Page 1 of 1

Modulative shadow missing on part of screen

Posted: Wed Aug 17, 2016 1:44 am
by Prod
With modulative shadows and antialias on, shadows are not drawn on the top and left line of the screen. Bug or design?
Does not happen with SaveRenderTexture(). Only the edge of screen is affected, 1 pixel wide.
(Windows 10 x64, PB 5.31+5.50)
Image

Code: Select all

InitKeyboard() : InitEngine3D() : InitSprite()

AntialiasingMode(#PB_AntialiasingMode_x2)

ExamineDesktops()
OpenScreen(DesktopWidth(0),DesktopHeight(0),32,"",#PB_Screen_NoSynchronization)

WorldShadows(#PB_Shadow_Modulative,1000,RGB(64,64,64),512)

AmbientColor(RGB(64,64,64))
a=CreateLight(#PB_Any,RGB(255,255,255),1000,300,00,#PB_Light_Directional) : LightLookAt(a,0,0,0)
CreateCamera(#PB_Any,0,0,100,100)

texture=CreateTexture(#PB_Any,16,16)
StartDrawing(TextureOutput(texture))
    Box(0,0,16,16,RGB(255,255,255))
StopDrawing()
material=CreateMaterial(#PB_Any,TextureID(texture)) : mesh=CreateCube(#PB_Any,1)
a=CreateEntity(#PB_Any,MeshID(mesh),MaterialID(material),0,-2,0) : ScaleEntity(a,100,1,100)
entity=CreateEntity(#PB_Any,MeshID(mesh),MaterialID(material),0,0,-8)

Repeat
    ExamineKeyboard()
    If KeyboardReleased(#PB_Key_Escape)<>0
        Break
    EndIf
    RotateEntity(entity,0.4,0.5,0.6,#PB_Relative)
    RenderWorld() : FlipBuffers() : Delay(10)
ForEver
End

Re: Modulative shadow missing on part of screen

Posted: Wed Aug 17, 2016 11:20 am
by applePi
Hi
i have tested your code in win7 and winxp with PB 5.31 and the shadow seems normal like this picture:
Image
the same shadow in PB 5.43.
if we add this in line 12:

Code: Select all

cam=CreateCamera(#PB_Any,0,0,100,100)
MoveCamera(cam, 0,70, 0.00001, #PB_Absolute)
CameraLookAt(cam,0,0,0)
so to position the camera high away over the scene we will see the whole shadow from above,

note: the 0.00001 because we can't see anything when we use absolute zero. may be Comtois look at this situation

Re: Modulative shadow missing on part of screen

Posted: Wed Aug 17, 2016 5:45 pm
by Comtois
applePi wrote:note: the 0.00001 because we can't see anything when we use absolute zero. may be Comtois look at this situation
try this

Code: Select all

cam=CreateCamera(#PB_Any,0,0,100,100)
CameraFixedYawAxis(cam, #False)
MoveCamera(cam, 0,70, 0, #PB_Absolute)
CameraLookAt(cam,0,0,0)

Re: Modulative shadow missing on part of screen

Posted: Thu Aug 18, 2016 12:47 am
by Prod
Updated. Image included showing what should happen and what I get.

Re: Modulative shadow missing on part of screen

Posted: Fri Aug 19, 2016 12:23 pm
by Comtois
Prod wrote:With modulative shadows and antialias on, shadows are not drawn on the top and left line of the screen. Bug or design?
I dont know, probably an Ogre stuff.