Posted By: Benni003
PSSM Shadows produce a crash on published version - 01/27/14 17:05
Hey there, I have a big problem with PSSM shadows... Currently my Game is tested on different Systems. Now my problem - With activated pssm shadows the engine crashes!
The crash just happens in the published version and just on systems with radeon grafic cards (always).
It makes me confused, because I'm not a expert in this, but one thing I found out. If I cut the following line from shadows.c no crash is happening, but also shadows are not visible then. I really hope that someone can help me, because I have to fix in withing two days
Here the line:
D3DXMatrixMultiply(&matSplit[i],&matSplit[i],pssm_texscale(pssm_res));
The crash just happens in the published version and just on systems with radeon grafic cards (always).
It makes me confused, because I'm not a expert in this, but one thing I found out. If I cut the following line from shadows.c no crash is happening, but also shadows are not visible then. I really hope that someone can help me, because I have to fix in withing two days
Here the line:
D3DXMatrixMultiply(&matSplit[i],&matSplit[i],pssm_texscale(pssm_res));
Code:
for(i=0; i<pssm_numsplits; i++) { // look from the sun onto the scene viewSplit[i]->pan = 180 + sun_angle.pan; viewSplit[i]->tilt = -sun_angle.tilt; vec_set(viewSplit[i]->x,sun_pos); // vec_normalize(viewSplit[i]->x,200); // calculate the split view clipping borders and transformation matrix view_to_split(camera,pssm_splitdist[i],pssm_splitdist[i+1],viewSplit[i],&matSplit[i]); LPD3DXEFFECT fx = viewSplit[i]->material->d3deffect; if(fx) fx->SetMatrix("matSplitViewProj",&matSplit[i]); // create a texture matrix from the split view proj matrix D3DXMatrixMultiply(&matSplit[i],&matSplit[i],pssm_texscale(pssm_res)); #ifdef DEBUG_PSSM DEBUG_BMAP(viewSplit[i]->bmap,300 + i*220,0.2); var pssm_fps = 16/time_frame; DEBUG_VAR(pssm_fps,200); DEBUG_VAR(pssm_splitdist[i+1],220 + i*20); #endif }