Hey,
I think i know what heppened here.
The Dualparabolic shader can only handle texturised objects and nobody can see black objects on a black background
There is a problem with relatively large objects wich have only a few verices.
Thats cause the Dualparabolic shader streches the objects in the vertex shader to map them to the halfspheres of the DB map.
I could also offer you to test my parralax corrected environmentmapping which i have half implemented into the shaderpack.
Messy test code for you:
// Project: ShaderTest
// Created: 21-05-15
#include ".\..\Templates\ShaderPack\Includes\ShaderPack.agc" //ShaderPack
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "ShaderTest" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
SetPrintSize(18)
create3DPhysicsWorld(1)
Set3DPhysicsGravity(0, -40, 0)
SetAmbientColor(50, 50, 50)
MoveCameraLocalZ(1, 5)
SP_Init()
SP_SetReadRawFiles(1)
SP_SkyBox_SetVisible(1) // its nicer that way ;)
img_Tiles_2_Alb = LoadImage( "Tiles 2_Alb.jpg" )
myTestObject = CreateObjectSphere(2,8,16)
//~ SetObjectColor(myTestObject, 255, 0, 0, 255)
SetObjectImage(myTestObject,img_Tiles_2_Alb,0) // the Dualparabolic shader can only handle texturized objects(maybe use createimagecolor ?)
SetObjectPosition(myTestObject, 2,3,-2)
Create3DPhysicsStaticBody(myTestObject)
SetObject3DPhysicsFriction(myTestObject, 0.5)
SP_AddObject(myTestObject)
myfloor = CreateObjectPlane(100, 100)
//~ SetObjectColor(myFloor, 66, 66, 66, 255)
SetObjectImage(myfloor,img_Tiles_2_Alb,0)
RotateObjectLocalX(myFloor, 90)
Create3DPhysicsStaticBody(myFloor)
SetObject3DPhysicsFriction(myFloor, 0.5)
SP_AddObject(myfloor)
myMover = CreateObjectBox(2, 2, 2)
//~ SetObjectColor(myMover, 150, 89, 255, 255)
SetObjectImage(myMover,img_Tiles_2_Alb,0)
SetObjectPosition(myMover, 0, 3, 0)
Create3DPhysicsDynamicBody(myMover)
SetObject3DPhysicsFriction(myMover, 0.25)
SetObject3DPhysicsCanSleep(myMover, 0)
SP_AddObject(myMover)
// Create a custom Environment map just for debugging and to be able to update the envmap inside the main loop constantly
DPEnvironmentID as integer
DPEnvironmentID=SP_Environment_AddDualParabolic(0,6,0,512,512)
SP_Environment_DPRender(DPEnvironmentID)
SP_Environment_Debug_DPVisible(DPEnvironmentID,1)
NormalImageID=LoadImage("Tiles 2_Nor.jpg")
SetImageWrapU(NormalImageID,1)
SetImageWrapV(NormalImageID,1)
//#### Glass ####
GlassObjectID = CreateObjectSphere(2,16,32)
SetObjectPosition(GlassObjectID, 0, 4, 0)
SP_Glass_AddObject(GlassObjectID,NormalImageID,DPEnvironmentID)
// Add the Glass Effect, the normalmap for the surface bumbiness
// the -1 means the system generates the "environment point" and links it to the object automatically
// you can also create the environment point manually and move it independently by using SP_Environment_AddPoint and passing the resulting EnvironmentID
SP_Glass_SetNormalSize(GlassObjectID,0.1) //damping the bumpiness a bit
SP_Environment_FixToObject(GlassObjectID,DPEnvironmentID) // still fix it to the object tho to hide the object while rendering the envmap
SetCameraPosition(1, 0, 8, -15)
do
SP_Environment_DPRender(DPEnvironmentID) // update the envmap to see other objects move...
SP_ControlCamera()
if (GetRawKeyState(38)) then SetObject3DPhysicsLinearVelocity(myMover, 0, 0, 1, 5)
if (GetRawKeyState(40)) then SetObject3DPhysicsLinearVelocity(myMover, 0, 0, -1, 5)
if (GetRawKeyState(37)) then SetObject3DPhysicsLinearVelocity(myMover, -1, 0, 0, 5)
if (GetRawKeyState(39)) then SetObject3DPhysicsLinearVelocity(myMover, 1, 0, 0, 5)
Step3DPhysicsWorld()
`Sync()
SP_Sync()
loop
Sorry for ansering so late, im currently distracted by 3D Printing, Arduino Programming and homeautomation so i only check here occasionally