0 registered members (),
1,397
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
PSSM Shadows produce a crash on published version
#436466
01/27/14 17:05
01/27/14 17:05
|
Joined: Aug 2008
Posts: 394 Germany
Benni003
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 394
Germany
|
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));
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
}
|
|
|
Re: PSSM Shadows produce a crash on published version
[Re: Benni003]
#436470
01/27/14 17:17
01/27/14 17:17
|
Joined: Aug 2002
Posts: 3,258 Mainz
oliver2s
Expert
|
Expert
Joined: Aug 2002
Posts: 3,258
Mainz
|
No, It's not 0 The crash just happens at a published version and just on systems with radeon cards. I wrote it I know, but nevertheless all possibilities should be checked Do you have the same FX files in your published game as you use while development?
|
|
|
Re: PSSM Shadows produce a crash on published version
[Re: oliver2s]
#436475
01/27/14 18:35
01/27/14 18:35
|
Joined: Aug 2008
Posts: 394 Germany
Benni003
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 394
Germany
|
I know, but nevertheless all possibilities should be checked OK Do you have the same FX files in your published game as you use while development? Yes I have and one time I removed every code in vp_pssm.fx and vp_depth.fx. I just wrote technique name {pass { }} in every shader so that the engine isn't angry But still the crash. The game was tested on a group of systems... with nvidia grafic cards no problem. with radeon -> crash. I think the code crashes because of this line: D3DXMatrixMultiply(&matSplit[i],&matSplit[i],pssm_texscale(pssm_res));
Last edited by Benni003; 01/27/14 18:36.
|
|
|
Re: PSSM Shadows produce a crash on published version
[Re: Benni003]
#436476
01/27/14 18:43
01/27/14 18:43
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Okay, then let's get cracking!
With what error message does it crash? Are you sure you are not reading past the array bounds? Might there be any SIMD alignment issues at work (I see that pssm_texscale() returns statically allocated memory and I don't know how good the Lite-C compiler is in regards to alignment rules... I know for a fact that it doesn't care about padding)
In short, more source code please with declaration of all relevant variables!
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: PSSM Shadows produce a crash on published version
[Re: WretchedSid]
#436480
01/27/14 20:03
01/27/14 20:03
|
Joined: Aug 2008
Posts: 394 Germany
Benni003
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 394
Germany
|
I made a small demo based on the crowed of the 3dgs folder. I used the original code from Crowed.c, shadows.c, vp_pssm.fx and vp_depth.fx. Here is the File: PSSM Test Demo On my system (and other systems) with nvidia graphic card: source code: WORKING published exe: WORKING On my second system (and other systems) with radeon graphic card: source code: WORKING published exe: NOT WORKING - the engine crashes without error message. I hope we will find the Problem and can fix it...
Last edited by Benni003; 01/27/14 20:04.
|
|
|
|