- Home /
Why the shadows look different in Android build?
This is a picture of my game developing now,
And the left one is when it's built for android and ran on it. And the right one is in the editor.
As you can see, there is a difference between them in shadow quality.
I'm using URP and currently setting the shadow mode as soft shadow and the quality to low resolution. I tried a variety of settings to find nice and good-looking shadow vibes.
And the right one is what I exactly want it to be looking
I could've just set the shadow quality to high resolution, But then it becomes too accurate and sharp.
So I just want to keep the setting as much as possible.
How can I fix this problem?
It looks like you've caught yourself in a weird, conflicting position between screen resolution and shadow resolution.
Based on the screenshots, the shadows appear to be the same resolution. The underlying shape(s) are the same, but therein lies the catch:
At the lower resolution, the same number of pixels cover a much larger distance on screen, providing what effectively appears to be smoother shadows. In reality, both shadows cover the same region (shadow resolution) and are given the same degree of blending with their neighboring pixels (blurred edges).
Because the edge blurring occurs on a pixel basis instead of a screen-ratio basis, however, the contours are more apparent at higher resolutions, since there are more pixels available to perform the blur element of the shadow rendering. If you increased the resolution of your Game View (right) in the editor, it would look more and more like the higher-resolution (left) image.
That said, I'm posting this as a comment because I *don't* have good advice to offer at the moment with respect to blurring the shadows over a greater number of pixels' distance.
Thank you very much for the comment.
Now I see why this happens. everything is so clear now, thank you so much!
Then, to solve this problem, I might have to fix the resolution to make it not variable of my game in order to keep the shadows looking the same as the game view. Although I don't think this is the best way.
This is interesting because when I was not using URP, the same thing never happened.