Trying to get SSAO to work. I am using physics and have shadows enabled. The models are very large.
Any help would be very much appreciated. I get a blank screen.
I have the setup code like this (From example)
SetWindowTitle( "Arcade kart physics - Tech demo" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
SetVirtualResolution( 1024, 768 ) // Display properties
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 ) // 30fps
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
SetPrintSize(24)
SetCameraRange( 1, 1, 50000 )
SetGenerateMipmaps(1)
SetResolutionMode(1)
SetImmersiveMode(1)
SP_Init() // To use the AppShaderKit System you need to initialise it and use its Sync command.
SP_SkyBox_SetVisible(1) // Activate the SkyBox
SP_SSAO_SetActive(1) // Activate Screen Space Ambient Occlusion
SP_SSAO_SetRadius(0.002) //Here we decrease the radius to a fixed value 0.002, default is 0.25
SP_SSAO_SetBlur(1.2,1.2)
SP_SSAO_SetStrength(1.4)
SP_SSAO_SetRenderImageSize(GetDeviceWidth(),GetDeviceHeight())
SP_SSAO_SetBlurRenderImageSize(GetDeviceWidth(),GetDeviceHeight())
e.sundirection = CreatePoint(0.5, -1, 0.5) /// Setup Sun and lighting
SetSunDirection(e.sundirection.x, e.sundirection.y, e.sundirection.z)
SetAmbientColor(0x60, 0x60, 0x60)
SetSunColor(0x80, 0x80, 0x80)
shadowmode as integer
shadowMode = 3 // start with cascade shadow mapping which gives the best quality
SetShadowMappingMode( shadowMode )
SetShadowSmoothing( 1 ) // random sampling
SetShadowMapSize( 2048, 2048 )
SetShadowRange( -1 ) // use the full camera range
SetShadowBias( 0.0012 ) // offset shadows slightly to avoid shadow artifacts
I add my objects like this
I use the Shader Pack sync;
Print( "Arrow keys to move, AWSZ-Camera, R-Reset, H-Show hit shape, G-Show ground contact "+str(screenFPS()) )
Print( "Velocity="+str(DistancePoint(vehicle.lastVelocity)))
SP_Sync()