Shadows Look Better In Editor

Alack SunriderAlack Sunrider Posts: 3Member
in 3D

Hi! I have a weird problem. I'm using a directional light with PSSM 4 splits in my 3D game. The shadows look great in the editor, but they look much worse when I play the game. Any suggestions?



  • TwistedTwiglegTwistedTwigleg Posts: 2,873Admin

    Welcome to the forums @Alack Sunrider!

    Maybe it is a project setting override? I know some platforms have settings that lower or change shadow quality for performance reasons. Though, I think this primarily affects mobile platforms, so unless you are exporting to Android/iOS, then this shouldn't be an issue.
    Regardless, I would maybe look in the project settings, just to be sure. I do not think that would be the issue, but since the exported game uses the project settings as an override over default settings, it may be something to look into.

    Though looking at the picture, as it took me a bit to see, it appears there is some shadow acne. I don't remember what the setting is right off, but on the light there should be a way to adjust the bias. I would see if tweaking this value just slightly fixes the issue. That wouldn't explain why the editor looks different than the exported game though.

    I dunno, but I will keep thinking about it in the background and if I think of something else, I'll let you know.


    This discussion was caught in the moderation queue since you have not confirmed your account yet.

    Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.

    If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks! :smile:

  • Alack SunriderAlack Sunrider Posts: 3Member

    Thank you for your answer! I'm not completely sure, but I think the shadow atlas size may only update for the editor when Godot is restarted. I think that's why there was a difference between the editor and the game. Messing with the parameters again gave me better results.

  • CalinouCalinou Posts: 452Admin Godot Developer
    edited July 10

    For the record, I posted an answer here:

    This is likely because your Camera node uses a different Far distance. If you leave the DirectionalLight shadow max distance to 0, it will use the camera Far distance to determine the shadow maximum distance. (The higher the distance, the lower the shadow quality will be.)

    To solve this, decrease your Camera node's Far property or set the DirectionalLight shadow max distance property to a non-zero value.

    PS: Sharper shadows aren't always better. Shadows that are too sharp can end up looking very artificial :)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file