Hi! I'm fairly new to Godot with just a few weeks of experience. I'm having a problem with how light works in Godot 4.1.

Directional light produces shade on the 3d models but it does not cast a shadow even on the Sprite3D.

Sprite3D's Cast Shadow is On. I also tinkered with Alpha Cut but nothing worked.
All of the CSGShape's Cast Shadow is On
Shadows are enabled on both the Directional Light and OmniLight
My renderer is currently set on Mobile because opening/starting projects in Forward+ crashes Godot.
Here's what the Output shows regarding my display driver:

For my laptop's specs, kindly see below:

I've rendered lighted scenes in Sketchup with this laptop before but I'm sure it's different with how Godot does it.
I tried starting a project in Godot 3.5 with a simple CSGBox and a Sprite3D with Directional Light and it works. Objects are casting shadows though I have to change the Alpha Cut for Sprite3D.

I just wanted to make sure that I can't make the light properly work in Godot 4 before I move on and work with what I have and what my laptop can do.

  • xyz replied to this.

    xyz I forgot to add that the shadows are also enabled in the light nodes

    • xyz replied to this.

      nachtbiermann First try it with only one directional light in the scene and set all shadow parameters to something minimal: disable cascading shadow maps by setting directional shadow mode to orthogonal, decrease shadow map size in project setting to 512 and disable soft shadows.

        In godot 4, is the sprite set like this?

        sprites have to be set to alpha cut discard or opaque prepass (or hash) to work, it allows them to be written into the depth buffer and work with buffer shadows.

        your console says Vulkan 1.0, but NVIDIA 940M has support for Vulkan 1.1. Are your drivers up to date?
        also your version of godot is old, you should be using godot 4.1.4 or 4.2.1. There are many bugs that have been fixed since 4.1.1.

          xyz still no changes. But I unticked the box for "Disable Receive Shadow" and set the DirLight's Max Distance at 5

          now it has a shadow that follows my camera. I can also see it in the working viewport if I scroll closely around the player

          Jesusemora yes the sprite set looks the same and the alpha cut is set to discard, I also tried the other options but they did not work. Regarding my drivers, I checked earlier and they are up to date according to Windows and Lenovo.

          I'll download 4.2 and hopefully it fixes the issue. Thank you!

          Jesusemora I opened the project in 4.2 and still the same. I can't even open projects in Forward+ since they also crash.

          • xyz replied to this.

            nachtbiermann Make a fresh project with only a ground plane, a box and a directional light and see if shadows are cast there. That way you'll at least know is it due to your hardware configuration or something went awry in the project itself.

              xyz The issue is still present with a fresh project. I am puzzled that it can render a shadow of something, it follows my camera.

                nachtbiermann I am puzzled that it can render a shadow of something, it follows my camera

                That's probably the shadow map bounding volume. What happens if you switch to your other graphics card?

                  nachtbiermann It appears to be driver problem or something wrong with your GPU. I haven't used windows in years, but aren't you supposed to only have ONE video driver?
                  there's one last thing to try, change your project to compatibility. it should still show shadows, if it's a Vulkan problem, it should fix itself because you will be using opengl instead.

                    Jesusemora it's a Vulkan problem. Switched the renderer to compatibility and got shadows right away. Thank you so much!!

                    xyz I switch from dedicated graphics card to integrated and results are the same. Vulkan seems to be the issue since I switch renderer to Compatibility and the scene now have shadows and better light:

                    I think I'll stick with this at the cost of some features exclusive to Mobile and Forward+
                    I appreciate your time and help. Thanks!!