I can't manage to get it running after converting it to C++ w/DGDK, just get a black screen, but the effect is running fine in DBPro.
I switched the object and textures, bumped up the number of planes for the effect, and increased the camera texture resolution. Attached an image of the result.
It looks quite nice. Good job Geecee3.
[Edit] Got it working in GDK. Need the Beta Upgrade to run in properly.
#include "DarkGDK.h"
void DarkGDK( void )
{
float d = 0.0;
float ox = 0.0;
float oy = 0.0;
float ax = 0.0;
float ay = 0.0;
float s = 0.0;
dbSetDisplayMode(800,600,32);
dbHideMouse();
dbAutoCamOff();
dbSyncOn();
dbSyncRate(0);
dbSetNormalizationOn();
dbSetDirectionalLight(0,0,-1.0,-1.0);
dbColorLight(0,255,200,32);
dbBackdropOn(0);
dbColorBackdrop(0,dbRGB(0,0,0));
dbPositionCamera(0,0.0,0.0,-639.0);
dbPointCamera(0,0.0,0.0,0.0);
dbMakeCamera(1);
dbBackdropOn(1);
dbColorBackdrop(1,dbRGB(0,0,0));
dbPositionCamera(1,5000.0,0.0,-639.0);
dbPointCamera(1,5000.0,0.0,0.0);
dbSetCameraToImage(1,100,512,384);
d = 0.0-(639.0-64.0);
for(int j=1;j<=10;j++)
{
d-=2.0;
dbMakeObjectPlain(100+int(j),102.4f,76.8f);
dbDisableObjectZWrite(100+int(j));
dbGhostObjectOn(100+int(j),2);
dbPositionObject(100+int(j),5000.0,5000.0,d);
dbTextureObject(100+int(j),0,100);
dbFadeObject(100+int(j),250.0f);
}
dbMakeCamera(2);
dbBackdropOn(2);
dbColorBackdrop(2,dbRGB(0,0,0));
dbPositionCamera(2,5000.0,5000.0,-639.0);
dbPointCamera(2,5000.0,5000.0,0.0);
dbSetCameraToImage(2,150,512,384);
d = 0.0-(639.0-64.0);
for(int j=1;j<=5;j++)
{
d -= 10.0;
dbMakeObjectPlain(150+int(j),102.4f,76.8f);
dbDisableObjectZWrite(150+int(j));
dbGhostObjectOn(150+int(j),2);
dbPositionObject(150+int(j),0.0,0.0,d);
dbTextureObject(150+int(j),0,150);
dbFadeObject(150+int(j),350.0f/float(j));
}
dbLoadImage("C:\\flare.png",200,1);
dbMakeObjectPlain(200,2048.0,2048.0);
dbPositionObject(200,5000.0,0.0,639.0);
dbTextureObject(200,200);
dbSetObjectLight(200,0);
dbLoadImage("C:\\backdrop.png",201,1);
dbMakeObjectPlain(201,2048.0,2048.0);
dbPositionObject(201,0.0,0.0,639.0);
dbTextureObject(201,201);
dbSetObjectLight(201,0);
dbLoadObject("C:\\demoshape.x",300);
dbPositionObject(300,0.0,0.0,0.0);
dbSetObjectAmbient(300,0);
dbScaleObject(300,3000,3000,3000);
dbSetSphereMappingOn(300,201);
dbFadeObject(300,1000);
dbCloneObject(400,300);
dbPositionObject(400,5000,0.0,0.0);
dbSetObjectAmbient(400,0);
dbFadeObject(400,0);
dbScaleObject(400,3000,3000,3000);
dbSetCurrentCamera(0);
while(LoopGDK())
{
dbPositionMouse(400,300);
ax += dbMouseMoveX();
ay -= dbMouseMoveY();
ox = dbCurveValue(ax,ox,10);
oy = dbCurveValue(ay,oy,10);
dbTurnObjectRight(300,0.75);
dbTurnObjectRight(400,0.75);
dbPitchObjectUp(300,1.0);
dbPitchObjectUp(400,1.0);
s = dbRnd(11)+95.0f;
dbScaleObject(200,s,s,100.0f);
dbRollObjectLeft(200,0.07f);
dbPositionObject(300,ox,oy,0.0);
dbPositionObject(400,5000.0f+ox,oy,0.0f);
dbSetCursor(10,10);
dbPrint("no shader volume shadow effect by Master Geecee3, escape to exit.");
dbSync();
}
}
AMD Opteron 185 2.6 Ghz | 2 GB RAM | 8800 GTS 640MB | Vista Home Premium