Code: Select all
ldir=(guVector){0.0f,0.0f,0.0f};
guVecMultiplySR(_GRR_view, &ldir,&ldir);
GX_InitSpecularDirv(&MyLight0, &ldir);
GX_InitLightShininess(&MyLight0, 10);
GX_InitLightColor(&MyLight0, (GXColor){0xFF,0xFF,0xFF,0xFF});
GX_LoadLightObj(&MyLight0, GX_LIGHT0);
/////////////////////// Turn light ON ////////////////////////////////////////////////
GX_SetNumChans(1);
GX_SetChanCtrl(GX_COLOR0, GX_ENABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT0, GX_DF_NONE, GX_AF_SPEC);
GX_SetChanCtrl(GX_ALPHA0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHTNULL, GX_DF_NONE, GX_AF_NONE);
GX_SetNumTevStages(1);
GX_SetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLOR0A0 );
GX_SetChanAmbColor(GX_COLOR0, (GXColor){0x00,0x00,0x00,0x00});
GX_SetChanMatColor(GX_COLOR0, (GXColor){0xE0,0xE0,0xE0,0xE0});
but here is the nice no buggy result :
here is a screen shot of a dirv {0.05f, 0.0f, 0.0f}
in fact if i use any other value than {0.0f,0.0f,0.0f} for dirv i always get something buggy as you can see.
Any Help ?