lichlichi

Hello! Thank you for coming here.
I use this shader (https://github.com/traggett/UnitySpriteShaders) to project shadows on the surface.
Thank God everything works fine, but the quality of the shadows, even with the maximum settings in the Quality section, does not show a good result on Android (there still are pixels on the edges of the shadows).
Perhaps there is a way to smooth them?
lichlichi
Posts: 4

Pharan

Please try using that shader on a plain Unity sprite and see if you get the same result.

If you do, it's definitely a setting and/or limitation in Unity itself or your scene setup.
User avatar
Pharan

Pharan
Posts: 5284

lichlichi

Pharan wrote:Please try using that shader on a plain Unity sprite and see if you get the same result.

If you do, it's definitely a setting and/or limitation in Unity itself or your scene setup.
Unfortunately, this shader does not work on the sprite. He just does not cast a shadow.

Most likely it's in some settings.
Attachments
shadows.jpg
lichlichi
Posts: 4

Pharan

I'm not too familiar or experienced with lighting setups. But I think it may have something to do with your ground plane either being a very large object, or it having a texture that's too low-resolution.
The setting is also part of the light settings and I think also depends on your rendering type?

You should ask Unity forums about the cube case to get some helpful answers, probably.
User avatar
Pharan

Pharan
Posts: 5284

PuppyPuppyPuppy

Given the shadow artifacts that are appearing on the front, top face of the cube, I think that you have a few areas that you should look at.

First, on the light itself, look at the various bias settings. Try first adjusting them until that is gone.

Next, head over to the player and quality settings. Try lowering your shadow distance there. Make it really low at first (like the distance between the plane and the camera). That should help a LOT with the artifacting that you are getting. Once you've done that, adjust it up until you have a comprise between smooth shadows and a good distance. It is usually default to a value that I've always found to be way too high.

Good luck! I think that both of those will take you a long way.
User avatar
PuppyPuppyPuppy
Posts: 29

Pharan

Thanks Puppypuppypuppy!

As usual, puppies are awesome.
User avatar
Pharan

Pharan
Posts: 5284


Return to Unity