as the subject is saying…
In unity 5.2. my shadows are going crazy and feel very very unstable in a very large world.
The issue seems to appear when I create a simple plane with some objects and place them at 20000 x 20000.
What can I do to fix this?
Regards! T
The only way to fix this is to not go that far out in your world. This is a problem with floating point numbers.
Floating point numbers (including the x, y, and z components of your position vector) can only be so precise, and can often have their least-significant bit be inaccurate. When working with smaller floats, the least accurate bit doesn’t matter much because it can be the difference between 1 and 1.00000000000001 (that’s why sometimes a position 0 can turn into an ugly 1e-18). Once you get into larger numbers, like 20000, you have fewer bits to represent the smaller decimal numbers, so when your least-significant bit is inaccurate, it’s much more noticeable (20000 can become 20000.001). Shadows are calculated at a pixel level, and when each pixel has a chance for inaccuracies, you REALLY start to notice.
Sorry there’s no better way.