0 registered members (),
677
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
PSSM and LOD
#420007
03/18/13 11:55
03/18/13 11:55
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
OP
Serious User
|
OP
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
I'm trying to get shadows casted from the 3rd lod of my model, by setting shadow_lod=3; The model is called character_0.mdl, and the 3rd lod model is called character_3.mdl. However, PSSM shadows still use the first lod for shadows, so I get an horrible performance. @sivan also checked this and noticed it really does not work, shadows changes together with model lod change.
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: PSSM and LOD
[Re: jcl]
#420074
03/19/13 12:33
03/19/13 12:33
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
OP
Serious User
|
OP
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
PSSM is a shader. It has no "shadow_lod". But you can certainly implement LOD steps in the PSSM script, or we can do that in a future version. on shadows.c code I found this:
viewSplit[i]->lod = shadow_lod;
That should do the trick, shouldn't it? If not, could you please explain how we can modify the PSSM script to get that working?
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: PSSM and LOD
[Re: jcl]
#420160
03/20/13 15:27
03/20/13 15:27
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
OP
Serious User
|
OP
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
No, it does not do the trick. The distance that determines the LOD stage is not the distance to the camera for split views. Implementing LOD steps in the script would require a render event that determines the entity's camera distance and switches its model accordingly.
Implementing it directly in the engine is probably a more elegant way, and I've put that on my list. okay, thanks
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: PSSM and LOD
[Re: painkiller]
#420710
04/01/13 11:36
04/01/13 11:36
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
OP
Serious User
|
OP
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
I've been able to get this working by removing NOLOD from line 95 in shadows.c and and setting viewShadow lod to shadow_lod, so it should look like this:
viewShadow->flags |= SHOW|UNTOUCHABLE|NOSHADOW|NOPARTICLE|NOSKY;
viewShadow->lod = shadow_lod;
With this code I can get lod offsets for shadows working nicely
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
|