Shadows became ugly pixelated in Unity Editor 5 after an Android build

Something strange happends with the shadows on the Unity Editor after an android build, somehow they turn very pixelated now, and before the build the shadows was ok, perhaps its a dx11 unity 5 bug?, thanks for any help.

Note: After perform a PC build the shadows are OK again, is there any way to have the shadows ok always?


I found a useful solution for this any other way results in no better shadows for android, no matter what high are the quality settings for shadows, even in the best quality they are pixelated on the application too, the only way to make them better its resizing all the objects and make them way more bigger, this results in better shadows for android, perhaps later could find another way, but anyway, hope this helps other people with similar issue.

Update: Resizing all the objects its the same as reducing the shadow distance on the quality settings, by default this is set on 150, but when the objects are resized up in the scale, then the shadow distance needs to be resized as well to 300 or more, so finally its the same result that reducing the shadow distance without resizing the objects, in that case there is no need to scale up the objects. The “close fit” instead of “stable fit” option, improves a lot the shadows, but still somehow pixelated a little.

Quality → Shadow Projection

Go to quality settings and change the android shadow resolution to medium or high.

@Edyvargas Have you set the Texture Compression to “Don’t override”?

Quality Settings - Shadow Distance from 150 to 10 made a huge difference for me
Edit: this can be useful only in scenarios where the player-to-shadow distance is fixed

  • First, you must check what build Quality that you used. you can check in Edit->Quality. for surely, you must click one of Level that already there when you follow this step.

  • If this step already fixing the shadow, and after build you get it again you should chose what build you want to test.
    (example : you fixing by use high quality, but when you compile it on android, that not fixed)

  • Then go to URP that you use. Select URP based on quality (in quality setting just now you should see what rendering that you used. you can see on Rendering Label). You will see Lighting and Shadow in the inspector of URP that you used.

  • In the Lighting->Shadow Resolution actually can be set to 256 px, it’s not a problem but it improve the quality of shadow.

  • The problem is Shadow->Depth Bias and Shadow->Normal Bias, for the Normal Bias you can set it by 0 and the Depth Bias you can set it by 3 or more. And for more best Quality, you can enable the Shadow->Soft Shadow.

Hope it work

Select your light, then change the resolution to “Very High Resolution” in the inspector.

74224-screenshot-light-resolution.png