question on shadow size

Started by MichaelJPCT, July 16, 2017, 08:28:31 AM

Previous topic - Next topic

MichaelJPCT

i used Shadowhelper to cast an object onto a wall, and noticed that when light is far away, the shadow was smaller than the object. is it normal? shouldn't the shadow be at least as large as the caster?

EgonOlsen


MichaelJPCT


MichaelJPCT

i found that the horizontal size of the shadow is correct, but the vertical size is smaller. the wall is smaller in vertical dimension, so it seems the receiver should be square or the shadow would be deformed. is that so?

EgonOlsen

No, it doesn't matter which shape the receiver has. It's just a projection of the depth map onto some polygons. It can't really be 'wrong' and your screenshot looks fine to me. Just make sure that the projector 'looks' into the right direction, or you'll get some kind of back projection onto the receiver which might indeed look wrong.

MichaelJPCT

i found out i must call both setFOV and setYFOV to have the correct size of shadow.

EgonOlsen

Y-fov should actually adjust itself automatically if not set. Maybe this still happens based on actual screen dimensions and not based on the aspect ratio of the depth texture. I'll look into it when I'm back from holiday...and didn't forget about it...