0 registered members (),
1,094
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Whats happening with this PSSM Shadow? (video included)
#465666
05/09/17 03:16
05/09/17 03:16
|
Joined: Apr 2002
Posts: 1,246 ny
jumpman
OP
Serious User
|
OP
Serious User
Joined: Apr 2002
Posts: 1,246
ny
|
Hi everyone, Im having a small problem with PSSM shadows. [video:youtube] https://youtu.be/u5pWD222IrQ[/video] If you watch the video, at a certain angle, the shadows disappear on the objects, but returns when the camera is rotated back. Any idea what could be going on? Im using the default PSSM shader. Here are my settings:
#ifdef PSSM
shadow_stencil = 8; // activate external shadows
// all objects get the SHADOW flag
for(you = ent_next(NULL); you; you = ent_next(you))
set(you,SHADOW);
pssm_transparency=.5;
// camera.clip_far = 10000;
camera.clip_near = 1;
pssm_fbias = 0.0001;
vec_set(sun_angle,vector(-90,60,1000));
pssm_splitweight=.5;
pssm_res=1024;
pssm_run(3);
#else
camera.material = mtlShadow; // render all objects with the mtlShadow material
viewDepth.stage = camera; // use the Depth view as a preprocessor for the camera view
#endif
Last edited by jumpman; 05/09/17 03:23.
|
|
|
Re: Whats happening with this PSSM? (video included)
[Re: sivan]
#465682
05/09/17 13:58
05/09/17 13:58
|
Joined: Apr 2002
Posts: 1,246 ny
jumpman
OP
Serious User
|
OP
Serious User
Joined: Apr 2002
Posts: 1,246
ny
|
Hey Sivan,
The terrain at the time had an RGBA texture i think, whatever the default multitexture shader needed. However, even if I put a blank texture or a simple bmp, these shadows still disappeared.
However, when i deleted the terrain and rebuilt the level, shadows returned and didnt disappear. I made a test level and imported the terrain again, and there the problem happened again.
But one thing I noticed was that my terrain was very small by default, and I normally scaled it up very big to fit the level. When I scaled it up, the shadow error happened, but when I left it at its default size the shadows stayed. When I made a new test terrain where by default it was very big, the shadows seemed to work correctly.
Does the scaled size of the terrain effect the PSSM shader? Bounding volume or something? Im not sure.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|