Hi I'm trying to get normal map to work, I've search in the forum for ways to do it, but I can't put neither way to work, here's the code and in attach all the media && code
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbAutoCamOff();
dbSetAmbientLight(50);
dbSyncOn();
dbSyncRate(60);
dbHideMouse();
dbSetGlobalCollisionOff();
dbBackdropOn();
dbColorBackdrop(0);
dbRandomize(dbTimer());
dbLoadImage("Teste\\Planet.dds", 1);
dbLoadImage("Teste\\Normal.dds",2);
dbLoadImage("Teste\\Normalize.dds",3,2);
//Mars
dbLoadEffect("FX\\NormalMapping.fx",1,0);
dbMakeObjectSphere(1,5,100,100);
dbSetObjectEffect(1,1);
dbTextureObject(1,0,1);
dbTextureObject(1,1,2);
dbTextureObject(1,2,3);
dbSetEffectTechnique(1,"Light1");
//dbSetEffectTechnique(1,"LightPosition");
dbHideLight (0);
dbMakeLight(1);
dbSetLightRange(1,5000);
dbColorLight(1,dbRGB(255,255,255) );
dbPositionLight (1,80.0f,0.0f,5.0f);
dbSetSpotLight(1,360.0f,0.0f);
float zoom=dbObjectSize(1)*3.0f;
float cameraX=-45.0f;
int gamma = 255;
dbYRotateObject(1,-163.0f);
while (LoopGDK() )
{
dbPositionCamera(dbObjectPositionX(1),dbObjectPositionY(1),dbObjectPositionZ(1)+zoom);
dbPointCamera(0.0f,0.0f,0.0f);
dbPositionLight (1, dbSin(cameraX)*zoom +dbObjectPositionX(1),0.0f,dbCos(cameraX)*zoom+dbObjectPositionZ(1));
dbSetLightToObjectPosition (1,2);
dbSync();
}
}