So lately we decided to upgrade to Unity 3 and I started converting our project.
Except for the fact that all of our custom shaders were broken (need to rewrite them with Surface Shader, which overall is a much easier way to write shaders without weird bugs) the conversion was smooth.
But there are couple of weird things that I want to share with you.
First off, the very well advertised deferred rendering engine. Let the numbers speak for themselves:
On my 9600GT:
Forward rendering - 80 fps
Deferred rendering - 35 fps
The models have about 8 pixel lights shining on them , which is enough in our case.
I cannot see any benefit of deferred rendering so far, considering that I am losing my anti aliasing as well.
So for now I decided that we’ll stick with Forward Rendering, as it is so much faster.
The problem here is that it seems that Unity team decided to pretty much shrink the support for it.
You can have only 1 directional light casting shadows in the entire scene. Want to have spotlights with shadows? Point lights? Tough luck.
Another problem are the shadows themselves.
Unity 2.6 had problems with shadows and 3.0 does 2 things better in this regard:
The shadows do seem to work a lot faster on my hardware and have less jitter.
But if you look at the shadows up close, this is what you get:
Now the shadow distance, number of cascades and resolution all have little effect to remedy this situation. All I was able to do is to get things look worse by trying every possible combination of options.
And while the shadows DO look softer and clearer from some distance (a big improvement), the close up just looks sub par.
The shadows look exactly the same in both deferred rendering and forward rendering modes.
So, we’ve got Beast, we’ve got deferred rendering but we still can’t get shadows to look good in 2011.
If anyone from unity team is reading this, do you guys think you could throw in a couple of more samples into the shadows for close up cases?
It is very disappointing that we still can’t get good looking realtime shadows.
So I have mixed feelings. I am happy about the better performance, new surface shaders and little cool tweaks. But I am not happy about how limited forward rendering is and how shadows are still being a problem.
Gennadiy