VTK Incorrect Shadows

I’ve been playing around with shadows in VTK as of lately. I may be wrong, but I’m pretty sure they have issues. Here’s a slightly modified example from the VTK examples. Reduced to one light directly above the sphere.

Shadows.cxx (4.8 KB)

You’ll see despite a light being positioned directly above the sphere it produces an ellipse shadow, no matter the view angle. Even worse if you swap lines 143-149 with 153-158. (Or attach a timer and post modified on the light). You’ll find the ellipse shadow varies with the aspect ratio of the window.

I’ve also toyed with the light a great deal (with varying spotlights, point lights, directional lights) all producing the same issues.

Here’s a video of the resize behavior. This could be two issues. One relating to resizing the window. The other with rendering correct shadows in the first place from differing views. This is currently preventing us from using Shadows in iMSTK.

@Lfx_Paul ?